Chapter 11. Building a media-sharing application

 

This chapter covers

  • Mapping the architecture to a technical implementation using AWS Lambda
  • Best practices for simplifying, consolidating, and evolving the architecture
  • Designing the data model on Amazon S3 and Amazon DynamoDB
  • Securely implementing the client application
  • Reacting to events in the back end

In the previous chapter, you completed the sample authentication service, adding more features, such as changing and resetting the password, and integrating the login process with Amazon Cognito to get temporary AWS credentials.

Now you’ll use the authentication service to manage your users and build a more complex example of event-driven serverless applications: a media-sharing app, where users can upload pictures privately or publicly share the content with other users.

11.1. The event-driven architecture

The overall architecture for the media-sharing app (figure 11.1) was the first example of this book, in chapter 1. It’s time to use all the things you learned to implement it.

Figure 11.1. Overall event-driven architecture of a media-sharing app, as proposed at the beginning of this book

The app should upload pictures privately or publicly, for all other users to see. Users should see thumbnails of the pictures they’re allowed to see, together with metadata, such as a title and a description.

11.2. Defining an object namespace for Amazon S3

11.3. Designing the data model for Amazon DynamoDB

11.4. The client application

11.5. Reacting to content updates

11.6. Updating content indexes

Summary

Exercise

sitemap