Question
A company is hosting a web application on AWS using a single Amazon EC2 instance that stores user-uploaded documents in an Amazon EBS volume. For better scalability and availability, the company duplicated the architecture and created a second EC2 instance and EBS volume in another Availability Zone, placing both behind an Application Load Balancer. After completing this change, users reported that, each time they refreshed the website, they could see one subset of their documents or the other, but never all of the documents at the same time.
What should a solutions architect propose to ensure users see all of their documents at once?
- A. Copy the data so both EBS volumes contain all the documents
- B. Configure the Application Load Balancer to direct a user to the server with the documents
- C. Copy the data from both EBS volumes to Amazon EFS. Modify the application to save new documents to Amazon EFS Correct
- D. Configure the Application Load Balancer to send the request to both servers. Return each document from the correct server
Explanation
The correct answer is C because using Amazon Elastic File System (EFS) provides a shared file system that can be accessed by multiple EC2 instances simultaneously, ensuring all documents are available across both instances. This resolves the issue of users seeing only subsets of their documents depending on which instance they are routed to.