AWS Lambda allows building applications that automatically scale without managing servers. A cost-effective, event-driven mobile architecture pays only for resources used. This reference architecture shows a scalable and highly available mobile backend with microservices for storage, APIs, and search requiring zero administration. It uses services like API Gateway, DynamoDB, S3, Cognito, CloudSearch and Lambda Functions to provide a flexible backend supporting dynamic mobile users.
Breaking the Kubernetes Kill Chain: Host Path Mount
AWS Lambda Mobile Backend Architecture
1. With AWS Lambda, you can build applications that automatically
scale without provisioning or managing servers. Since many
mobile applications today have a limited budget for upfront
infrastructure, a cost-effective, event-driven mobile architecture
allows you to pay only for what you use.
This reference architecture shows an example of a highly avail-
able and scalable mobile backend featuring microservices,
storage, and API endpoints requiring zero administration.
System
Overview
AWS LAMBDA:
MOBILE BACKEND
Amazon API Gateway
Amazon CloudSearch
Amazon CloudFront
Amazon Dynam
oDB
Amazon Cognito
AWS
Reference
Architectures
Amazon S3
Mobile application backend infrastructures require scalability,
elasticity, and low latency to support a dynamic user base. Unpre-
dictable peak usage and a global footprint of mobile users requires
mobile backends to be fast and flexible.
The growing demand from mobile users means applications need
a rich set of mobile services that work together seamlessly without
sacrificing control and flexibility of the backend infrastructure.
AW
S
Lam
bda
Amazon SNS
1 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.
7 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.
2 User-generated media files are stored in Amazon
Simple Storage Service (Amazon S3), a highly
available and durable storage service.
5 Mobile applications require a highly scalable backend
infrastructure to support the variable usage created by
mobile users. AWS Lambda runs code in response to re-
quests and automatically manages and scales the underlying
resources. Lambda Function 1 provides a synchronous end-
point for users to store and retrieve unstructured data from
Amazon DynamoDB.
4 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.
3 Mobile users can access their uploaded digital assets
stored in Amazon S3 through Amazon CloudFront, a
low latency, content delivery network.
Amazon
API Gateway
●
●●NOTIFICATION
Amazon
SNSAmazon
CloudFront
Amazon
S3
AW
S
Lambda
Amazon
Cognito
Amazon
CloudSearch
Content
Delivery
Network
Content
Delivery
Network
Mobile
UsersMobile
Users
Lambda
Func�on 1
Lambda
Func�on 1
Data
StoreData
Store
Lambda
Func�on 2
Lambda
Func�on 2
Mobile Push
No�fica�ons
Mobile Push
No�fica�ons
Media Files
Repository
Media Files
Repository
Search
EngineSearch
Engine
Lambda
Func�on 3
Lambda
Func�on 3
Lambda
Func�on 4
Lambda
Func�on 4
●●NOTIFICATION
Amazon
DynamoDB
●●NOTIFICATION
6
database
stream
1
2
3
4
4
5
7
8
6 Lambda Function 2 uses Amazon DynamoDB
Streams to retrieve changes made by users, creates a
searchable document, and inserts it into Amazon
CloudSearch.
8 Lambda Function 4 provides an asynchronous end-
point for mobile users to communicate with each other
within a mobile application. The function formats each com-
municaton request and sends a push notification to specific
users with Amazon SNS.