Serverless Architecture for Voting Application

This is an architecture of simple Serverless Application which enables users to build scalable, highly available and sophisticated web application without zero servers to manage.

Courtesy: MWServerless Community

Platform: AWS


Twitter: @AWSCloud

Architecture Overview

  • The user’s DNS requests are served by Amazon Route 53, a highly available Domain Name System service. Network traffic is routed to infrastructure running in Amazon Web Service.
  • Static content is delivered by Amazon CloudFront, a global network of edge locations. Requests are automatically routed to the nearest edge location. The static resources and content are stored in Amazon Simple Storage (S3), a highly durable storage infrastructure designed for mission-critical and primary data storage. S3 serves the static content for the website such as HTML, CSS and Javascript files.
  • A user first authenticates (either using Cognito User Pools, an external identity provider, or your own custom developed authentic system), the client calls out to Amazon Cognito in order to obtain temporary credentials to call Amazon API Gateway. Cognito retrieves credentials from AWS STS to pass back to the user.
  • API requests are signed using the temporary credentials obtained from Amazon Cognito and sent to the Amazon API Gateway service which provides features such as security and throttling for your APIs. Requests are passed through the API Gateway where they can be transformed and passed through to the backend service logic.
  • AWS Lambda provides the backend business logic for your web application. You do not run servers, but instead, upload code to AWS which will be invoked when a request comes into your API. The service is highly scalable and removes the need to manage infrastructure.
  • As a fully managed database solution, Amazon DynamoDB provides fast, consistent performance as the data layer for your web application.