Serverless Architecture for Mobile Backend

This is an architecture of simple Mobile Application which enables users to upload photos and notes using Amazon Simple Storage Service (Amazon S3) and Amazon API Gateway respectively.

Courtesy: MWServerless Community

Platform: Amazon Web Service

Website: aws.amazon.com

Twitter: @AWSCloud

Architecture Overview

  • Amazon Cognito – Mobile users retrieve an identity from Amazon Cognito, which offers mobile identity management and data synchronization across mobile devices. Once a mobile user has received an identity, the user is granted access to other AWS services.
  • Amazon S3 – User-generated media files are stored in Amazon Simple Storage Service (Amazon S3), a highly available and durable storage service.
  • Amazon CloudFront – Mobile users can access their uploaded digital assets stored in Amazon S3 through Amazon CloudFront, a low latency, content delivery network.
  • Amazon API Gateway – Mobile users send requests to Amazon API Gateway to access application logic and dynamic data. API Gateway acts as an entry point for mobile applications to access functionality from code running on AWS Lambda.
  • AWS Lambda – Mobile applications require a highly scalable backend infrastructure to support the variable usage created by mobile users. AWS Lambda runs code in response to requests and automatically manages and scales the underlying resources.
    • Lambda Function 1 provides a synchronous endpoint for users to store and retrieve unstructured data from Amazon DynamoDB.
    • Lambda Function 2 uses Amazon DynamoDB Streams to retrieve changes made by users, creates a searchable document, and inserts it into Amazon CloudSearch.
    • Lambda Function 3 provides a synchronous interface for users to search for data from CloudSearch. CloudSearch manages and scales the search solution for the mobile backend.
  • Lambda Function 4 provides an asynchronous endpoint for mobile users to communicate with each other within a mobile application. The function formats each communication request and sends a push notification to specific users with Amazon SNS.