A solutions architect is designing a highly resilient architecture for a web application. The application's static assets are stored in a primary Amazon S3 bucket in one AWS Region. The architect needs to ensure that the assets remain available even if the primary S3 bucket experiences an outage, by failing over to a backup S3 bucket in a different Region with minimal operational complexity. Which configuration will meet these requirements?
- Create an Amazon CloudFront origin group with the primary S3 bucket as the primary origin and the backup S3 bucket as the secondary origin.Answer
- BConfigure an Amazon Route 53 latency routing policy with health checks to fail over traffic directly between the two S3 bucket endpoints.
- CCreate an Amazon CloudFront distribution and set the Time-to-Live (TTL) of all cache behaviors to 0 seconds to bypass caching and query the backup bucket.
- DDeploy an AWS WAF Web ACL associated with the Amazon CloudFront distribution to inspect requests and redirect them to the backup bucket during an outage.
Answer
Create an Amazon CloudFront origin group with the primary S3 bucket as the primary origin and the backup S3 bucket as the secondary origin.
Creating a CloudFront origin group is the most efficient and native way to configure failover for static assets. By grouping the primary and secondary S3 buckets, CloudFront automatically reroutes incoming requests to the backup bucket when the primary bucket returns error codes indicating an outage.
Step-by-Step Solution
Key Concept
CloudFront Origin Groups and Origin Failover