Serverless models are designed to be very efficient and cost-effective. They provide a high level of abstraction over the computing layer and they are 100% designed to be stateless.
The stateless design principle consists of offloading all persistence out of the compute service, in the following diagram several persistence services are used, such as Amazon S3, Amazon ElasticSearch, and DynamoDB.
This architecture represents a voting platform with a real-time dashboard that presents voting results in real time. Every vote is done via a mobile app. When the user votes, this event triggers an API gateway service endpoint invoking a custom resource like POST /votes/candidate.
When this vote is received by the API gateway resource an integration is executed, for this case is a Lambda function that provides the logic to increment the valid_votes table...