Question

Difficulty: HardEdge Caching and Content Delivery for Resilient Architectures

A financial services firm hosts a global portfolio analytics application on AWS. The application consists of a dynamic transaction API hosted on Application Load Balancers (ALBs) in two AWS Regions: eu-west-1 (primary) and ap-southeast-1 (standby). Additionally, the application generates static PDF reports that are stored in Amazon S3 buckets in both regions. The firm requires a resilient routing and edge caching strategy that minimizes latency for global users, guarantees automatic failover to the standby region for both dynamic APIs and static reports, and keeps operational overhead to a minimum.

Which TWO actions should a solutions architect take to meet these requirements?

  1. Configure a CloudFront Origin Group with the primary S3 bucket as the primary origin and the secondary S3 bucket as the failover origin. Create a cache behavior for /reports/* that routes requests to this Origin Group.Answer
  2. Configure a CloudFront Origin Group with the primary ALB as the primary origin and the secondary ALB as the failover origin. Create a default cache behavior (*) routing to this Origin Group, and attach the Managed-CachingDisabled cache policy.Answer
  3. C
    Configure Route 53 Latency Routing to route dynamic traffic directly to the two regional ALBs, bypassing CloudFront to ensure the lowest latency and automatic DNS failover for APIs without edge network routing.
  4. D
    Attach an AWS WAF Web ACL to the CloudFront distribution and configure a custom rule that intercepts 502 Bad Gateway responses from the primary ALB to redirect the request to the secondary ALB.
  5. E
    Create a single CloudFront cache behavior for all paths (*) pointing to a combined ALB and S3 origin, and set the default, minimum, and maximum Time to Live (TTL) values to zero to guarantee dynamic requests are not cached.

Answer

To meet the requirements, the solutions architect should configure a CloudFront Origin Group with the primary S3 bucket as the primary origin and the secondary S3 bucket as the failover origin with a cache behavior for static reports, and configure a separate CloudFront Origin Group for the ALB origins with a default cache behavior using a disabled caching policy.
The correct implementation requires establishing separate CloudFront Origin Groups for S3 and ALB endpoints. For the static reports path, a dedicated cache behavior directs traffic to the S3 Origin Group, ensuring low-latency delivery of cached reports and automatic standby-bucket failover. For the dynamic transaction path, a default cache behavior points to the ALB Origin Group with the Managed-CachingDisabled policy. This ensures transaction requests bypass the edge cache but benefit from edge routing failover and optimized network pathing.

Step-by-Step Solution

1
Separate the static assets (/reports/*) from the dynamic transactions (*) in the CloudFront cache behavior settings.
Two distinct paths are configured to handle caching properties independently.
Static content should be cached at edge locations to minimize latency, while dynamic content must bypass the cache to ensure real-time query results.
2
Group the primary and standby S3 buckets into a CloudFront Origin Group.
High availability is configured for the static assets layer at the edge.
If the primary S3 bucket fails, CloudFront automatically routes requests to the failover bucket in the standby region.
3
Group the primary and standby ALBs into a second CloudFront Origin Group.
Edge-level failover is configured for the dynamic application layer.
This guarantees dynamic API requests failover automatically with minimal delay, leveraging the AWS global network for optimized latency.
4
Apply a CachingDisabled policy to the default cache behavior routing to the ALB Origin Group.
Dynamic content bypasses edge caching while maintaining routing resilience.
This prevents transactional payloads from being cached while still using CloudFront's persistent connections and Origin Group failover capabilities.

Key Concept

CloudFront Origin Groups and Path-Based Caching Profiles
Estimated Time:2m 0s
Rate this question