The whitepaper on AWS Serverless Application Lens is a treasure trove of information on how to correctly design a serverless application on AWS. However, if you are short on time and want a gist of the whitepaper, this article aims to provide that for you. Although in order to become an AWS serverless ninja, the whitepaper, especially the links included in it are highly recommended.

Overview

Following is an overview of all the services that are generally included in a serverless architecture. It is assumed that the reader knows the general functionality of each of these services.

Image for post

Design Principles

Image for post

Serverless Architectures

RESTful Microservices

Here API Gateway provides built-in authorizationthrottlingsecurityfault tolerancerequest/response mapping, and performance optimizations by using features like caching. Lambda provides the** business logic** and DynamoDB serves as a scalable data storage. In case there is no business logic, for e.g. CRUD Operations, Lambda could / should be omitted from this architecture allowing API Gateway to connect directly to DynamoDB. Use the API Gateway logging to understand consumer access patterns / behaviors.

Image for post

Web Applications

This architecture is very similar to the RESTful microservices architecture. The extra elements here are** S3**, **Cloudfront **and Cognito. **Cognito **is used for authentication and as a directory service. **Cloudfront **is used for secure and fast delivery of the static content stored on S3.

Image for post

Mobile Backend

Amazon Cognito is used for user management and as an identity provider for your mobile application. Amazon S3 stores static assets that are served securely via CloudFrontAWS AppSync hosts **GraphQL **HTTP requests and responses to mobile users. Here the data from AWS AppSync is real-time when devices are connected, and data is available offline as well. Data sources for this scenario are DynamoDB, **Elasticsearch **and Lambda. DynamoDB provides persistent storage for your mobile application, including mechanisms to expire unwanted data from inactive mobile users through a Time to Live (TTL) feature. The Lambda function handles interaction with other third-party services, or calling other AWS services for custom flows. Amazon Pinpoint captures analytics from clients and is used as a customer engagement tool.

#aws #api-gateway #serverless #lambda #serverless-architecture

AWS Serverless Application Lens 
2.10 GEEK