A company hosts its static website assets in an Amazon S3 bucket located in the us-east-1 Region. To ensure high availability and resiliency, the company replicates these assets to a secondary S3 bucket in the us-west-2 Region. A solutions architect needs to configure Amazon CloudFront to deliver these assets with low latency and automatically serve files from the backup S3 bucket if the primary S3 bucket returns an HTTP 503 Service Unavailable error. Which configuration should the solutions architect use to meet these requirements?
- Configure a CloudFront origin group with the primary S3 bucket as the primary origin and the secondary S3 bucket as the failover origin, selecting the 503 status code in the failover criteria.Cevap
- BCreate an Amazon Route 53 latency-based routing policy to automatically route user requests to either the primary or secondary S3 bucket based on the health check status of the buckets.
- CDeploy AWS WAF with a custom web ACL rule on the CloudFront distribution to inspect traffic and redirect client requests to the secondary S3 bucket when the primary S3 bucket returns a 503 error.
- DConfigure the CloudFront cache behavior for static assets to have a Time to Live (TTL) of zero, forcing CloudFront to query both S3 buckets in parallel for every user request.
Cevap
Configure a CloudFront origin group with the primary S3 bucket as the primary origin and the secondary S3 bucket as the failover origin, selecting the 503 status code in the failover criteria.
Configuring a CloudFront origin group provides a native, seamless way to implement high availability for static content. By setting up an origin group with a primary S3 bucket and a failover S3 bucket, CloudFront automatically retries the request against the secondary origin when the primary origin returns specific HTTP status codes such as 503.
Adım Adım Çözüm
Anahtar Kavram
CloudFront Origin Groups and Origin Failover
Tahmini Süre:50s