Home icon

Intelligent failover using AWS Lambda@Edge and Amazon DynamoDB

Networking & Content Delivery Blog



This article describes a serverless solution using AWS Lambda@Edge and Amazon DynamoDB to intelligently route user traffic across multiple AWS regions with session affinity and automatic failover capabilities.

  • Lambda@Edge runs custom routing logic at 13 Regional Edge Cache locations to dynamically assign users to specific regions based on session IDs
  • DynamoDB stores endpoint configurations and user-session mappings, with Global Tables enabling multi-region replication for resilience
  • Solution handles regional outages gracefully by evacuating users from impaired regions and redistributing them to healthy endpoints
  • Operates on the data plane after setup, avoiding control plane bottlenecks and enabling millisecond-level failover decisions
  • Ideal for applications requiring session affinity, A/B testing, cell-based architectures, and high availability in e-commerce, finance, and healthcare
  • Open-source implementation available via AWS CDK for easy deployment

This architecture provides a cost-effective, scalable foundation for mission-critical applications requiring resilient multi-region traffic management with minimal operational complexity.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

May 20
2026
Best practices for Amazon DynamoDB Global Tables – Part 2: Failover strategies
Jul 8
2024
Implementing multi-Region failover for Amazon API Gateway
Mar 9
2026
Enabling resilient hybrid edge architectures with AWS
Aug 25
2025
Gracefully handle failed AWS Lambda events from Amazon DynamoDB Streams

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.