AWS Certified Solutions Architect - Associate / Question #1871 of 1019

Question #1871

A company is developing a media sharing platform hosted on Amazon EC2 instances behind an Application Load Balancer (ALB). The EC2 instances are part of an Auto Scaling group spanning multiple Availability Zones. Users frequently upload and modify media files, such as images and videos, which must be immediately accessible across all instances. A solutions architect needs to ensure all EC2 instances have real-time access to the latest media assets with minimal latency. Which solution meets these requirements?

A

Modify the EC2 user data script in the Auto Scaling group to transfer media files from the latest launched EC2 instance. Configure the ALB to direct media uploads exclusively to the newest EC2 instance.

B

Store media assets on an Amazon Elastic File System (EFS) and mount the EFS file system on each EC2 instance. Configure the platform to access media assets directly from the mounted EFS file system.

C

Upload media assets to an Amazon S3 bucket. Configure each EC2 instance to download assets to its attached Amazon Elastic Block Store (EBS) volume during launch. Schedule an hourly S3 sync command to update the EBS volume.

D

Create an Amazon EBS volume containing the media assets and share it across all EC2 instances. Configure the platform to reference the shared EBS volume for media storage.

Explanation

The correct answer is B because:

- Amazon EFS is a managed, shared file system that can be mounted on multiple EC2 instances across multiple Availability Zones (AZs). It ensures real-time consistency and low-latency access to media files, meeting the requirement for immediate accessibility.
- Why other options fail:
- A: Directing uploads to the newest EC2 instance creates a single point of failure and delays in syncing files across instances.
- C: Hourly S3 sync introduces delays, violating the real-time requirement. EBS volumes are also instance-specific and not shared.
- D: EBS volumes cannot be shared across multiple EC2 instances in different AZs simultaneously.

Key Points:
- Use EFS for shared, cross-AZ file storage with real-time consistency.
- Avoid solutions relying on manual syncing or single-AZ storage (e.g., EBS).
- S3 is ideal for static assets but not real-time file system access.

Answer

The correct answer is: B