Serverless applications in the Well-Architected Framework
The AWS Well-Architected Framework has a guiding document called the Serverless Applications Lens. This document covers common serverless design scenarios and lays out best practices. The core design principles are as follows:
- Singular: Functions should be single-purpose and simple enough to satisfy the one case they serve.
- Concurrency is the key: Any design decisions you take should be based on how many concurrent invocations the use case would need, as serverless is always tuned for concurrency.
- Stateless: FaaS is ephemeral in nature and doesn’t store anything in its own environment. It should share nothing and you should assume that its execution state and underlying storage are perishable. If durability is part of the use case, use persistent remote storage.
- Orchestrate with state machines: While it is possible to chain Lambda functions to orchestrate complex workflows, it will defeat the very...