AWS Certified Solutions Architect – Associate (SAA-C02) — Question 505
A company is building a web application that serves a content management system. The content management system runs on Amazon EC2 instances behind an
Application Load Balancer (ALB). The EC2 instances run in an Auto Scaling group across multiple Availability Zones. Users are constantly adding and updating files, blogs, and other website assets in the content management system.
A solutions architect must implement a solution in which all the EC2 instances share up-to-date website content with the least possible lag time.
Which solution meets these requirements?
Answer options
- A. Update the EC2 user data in the Auto Scaling group lifecycle policy to copy the website assets from the EC2 instance that was launched most recently. Configure the ALB to make changes to the website assets only in the newest EC2 instance.
- B. Copy the website assets to an Amazon Elastic File System (Amazon EFS) file system. Configure each EC2 instance to mount the EFS file system locally. Configure the website hosting application to reference the website assets that are stored in the EFS file system.
- C. Copy the website assets to an Amazon S3 bucket. Ensure that each EC2 instance downloads the website assets from the S3 bucket to the attached Amazon Elastic Block Store (Amazon EBS) volume. Run the S3 sync command once each hour to keep files up to date.
- D. Restore an Amazon Elastic Block Store (Amazon EBS) snapshot with the website assets. Attach the EBS snapshot as a secondary EBS volume when a new EC2 instance is launched. Configure the website hosting application to reference the website assets that are stored in the secondary EBS volume.
Correct answer: B
Explanation
Amazon Elastic File System (Amazon EFS) is a shared, POSIX-compliant file system that can be mounted simultaneously by multiple Amazon EC2 instances across different Availability Zones, ensuring immediate file updates with minimal latency. Using Amazon S3 with an hourly sync (Option C) or EBS snapshots (Option D) introduces significant propagation delays and does not support real-time concurrent writes across multiple instances. Modifying user data and limiting ALB traffic to a single instance (Option A) breaks high availability and scalability best practices.