Building Resilient Serverless Architectures on AWS

Listen to this Post

Featured Image
Serverless architectures offer great scalability and reduced operational overhead, but their resilience is often overestimated. When combining AWS services like API Gateway, Lambda, and DynamoDB, the overall system availability decreases due to the multiplicative effect of individual SLAs.

Calculating System Availability

AWS provides SLAs for its services, but chaining them reduces uptime:
– API Gateway: 99.95%
– Lambda: 99.95%
– DynamoDB: 99.99%

Total Availability:

`99.95% × 99.95% × 99.99% = 99.89%`

This means ~9.5 hours of potential downtime per year.

Improving Resilience with Multi-Region Deployments

To achieve higher availability, consider active-active or active-passive multi-region setups:
– Two-region redundancy:
`0.11% failure chance in one region → 0.11% × 0.11% = 0.000121%`
Resulting uptime: 99.999879% (~1 minute of downtime per year).

You Should Know:

1. AWS CLI Commands for Multi-Region Setup