Q28 — AWS SAA-C03 Ch.17

Question 28 of 89 | ← Chapter 17

Q1328. A company recently launched its website to serve content to its global user base. The company wants to store and accelerate the delivery of static content to its users by leveraging Amazon CloudFront with an Amazon EC2 instance attached as its origin.How should a solutions architect optimize high availability for the application?

Correct Answer: C. Configure another EC2 instance in a different Availability Zone as part of the origin group.

Explanation

To optimize high availability for the application while using Amazon CloudFront with an EC2 origin, the best solution is:Correct Answer:C. Configure another EC2 instance in a different Availability Zone as part of the origin group.Why This Solution is Best?\1. High Availability Across Availability Zones (AZs)CloudFront can failover to a secondary origin if the primary origin becomes unavailable. By deploying EC2 instances in different AZs, the solution ensures redundancy and resilience against AZ failures.Origin groups in CloudFront allow defining a primary and secondary origin, enabling automatic failover when the primary is unhealthy.\2. Avoids Single Point of FailureIf both EC2 instances are in the same AZ (Option D), an AZ outage would take down the entire origin, causing downtime.Cross-AZ deployment (Option C) ensures that if one AZ fails, CloudFront can still serve content from the other AZ.\3. More Effective Than Lambda@Edge or S3 Transfer Acceleration Lambda@Edge (Option A) is useful for custom logic at the edge (e.g., modifying requests/responses, A/B testing), but does not improve origin availability.S3 Transfer Acceleration (Option B) is for faster uploads to S3, not for improving high availability of an EC2- based origin.Why Other Options Are Less Suitable?A. Use Lambda@Edge for CloudFrontLambda@Edge runs custom code at edge locations but does not provide origin redundancy. Use case: Dynamic content manipulation, A/B testing, or security headers--not high availability.B. Use Amazon S3 Transfer Acceleration for CloudFrontS3 Transfer Acceleration speeds up uploads to S3 by using edge locations. Not relevant here since the origin is an EC2 instance, not S3.D. Configure Another EC2 Instance in the Same AZSame AZ deployment does not improve availability--if the AZ fails, both instances go down.High availability requires redundancy across AZs.Recommended ArchitectureDeploy two EC2 instances (one in AZ-A, another in AZ-B).Configure an Origin Group in CloudFront:Primary origin: EC2 instance in AZ-A.Secondary origin: EC2 instance in AZ-B.CloudFront automatically fails over to the secondary origin if the primary becomes unhealthy. Static content is cached at edge locations, reducing load on origins.ConclusionThe best way to ensure high availability for an EC2-based CloudFront origin is:C. Configure another EC2 instance in a different Availability Zone as part of the origin group. Other options either do not improve availability (A, B) or introduce a single point of failure (D).