Soru

Zorluk: OrtaEdge Caching and Content Delivery for Resilient Architectures

A company hosts a global media application that distributes static images from an Amazon S3 bucket. To minimize latency and protect the application from origin server failures, a solutions architect is implementing an Amazon CloudFront distribution. The architecture must automatically redirect traffic to a backup S3 bucket in a different AWS Region if the primary S3 bucket returns an HTTP 502 or 504 error. Which combination of actions should the solutions architect perform to meet these resiliency requirements? (Select TWO.)

  1. Create a CloudFront origin group containing both the primary and backup S3 buckets as origins, designating the primary bucket as primary.Cevap
  2. Configure the CloudFront distribution's cache behavior to direct requests to the newly created origin group.Cevap
  3. C
    Configure an Amazon Route 53 failover routing policy that points to the primary and backup S3 bucket endpoints, and set the CloudFront origin to this Route 53 record.
  4. D
    Deploy an AWS WAF web ACL associated with the CloudFront distribution, and configure a custom rule to intercept 5xx errors and redirect requests to the backup S3 bucket.
  5. E
    Set the Minimum TTL, Default TTL, and Maximum TTL to 0 in the cache behavior settings to force CloudFront to query both S3 buckets simultaneously for each request.

Cevap

Create a CloudFront origin group with the primary and backup S3 buckets, and configure the cache behavior to point to this origin group.
To set up automatic failover for static content distributed via CloudFront, you must create an origin group that contains a primary origin (the primary S3 bucket) and a secondary origin (the backup S3 bucket). You specify the failover criteria (e.g., HTTP 502 and 504 status codes) that trigger the failover. Finally, you configure the cache behavior to target the origin group so that requests are routed through this failover logic.

Adım Adım Çözüm

1
Define origins in the CloudFront distribution
Two distinct origins are created within the CloudFront configuration: one pointing to the primary S3 bucket and another pointing to the backup S3 bucket.
Before an origin group can be configured, the individual origin endpoints must exist in the distribution.
2
Create and configure an origin group
An origin group is established with the primary S3 bucket set as the primary origin and the backup S3 bucket set as the failover origin. The failover criteria are configured to trigger on HTTP 502 and 504 status codes.
This establishes the automatic failover relationship and defines which HTTP status codes from the primary origin will trigger a redirection to the backup origin.
3
Associate the origin group with the cache behavior
The cache behavior for the static images is updated to target the origin group instead of a single origin.
This ensures that incoming user requests are processed by the origin group, enabling the failover mechanism when errors occur.

Anahtar Kavram

CloudFront Origin Groups and Origin Failover
Bu soruyu puanla