Amazon CloudFront to Amazon API Gateway with failover

Amazon CloudFront → API Gateway → AWS Lambda

Deploy CloudFront in front of API Gateway with failover.

This pattern creates an Amazon Cloudfront failover distribution on front of an Amazon API Gateway HTTP API and an AWS Lambda function in two different Regions.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/cloudfront-failover-apigw-http-api-lambda-rust

Deploy

sam deploy --guided


Testing

See the repo for detailed testing notes.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Daniele Frasca

Daniele Frasca

I am Daniele Frasca serverless enthusiast. I build and architect serverless applications at scale.