Question #990
A company needs to migrate its e-commerce platform from an on-premises data center to AWS. The platform consists of a Java-based application server, a Redis cache, and a PostgreSQL database. The application requires persistent NFS-compatible storage for session data. The new AWS solution must scale from 5 Amazon EC2 instances to 40 EC2 instances during peak traffic periods, require no application modifications, and ensure no data loss occurs. Which solution meets these requirements?
Create an Amazon Elastic File System (Amazon EFS) file system. Deploy the Java application to AWS Elastic Beanstalk with an Application Load Balancer and an Auto Scaling group. Use .ebextensions to mount the EFS file system to the EC2 instances. Deploy an Amazon Aurora PostgreSQL database separate from the Elastic Beanstalk environment.
Create an Amazon Elastic Block Store (Amazon EBS) Multi-Attach volume. Deploy the Java application using a launch template and an Auto Scaling group. Create a Network Load Balancer for traffic distribution. Use EC2 user data to attach the EBS volume to instances. Deploy an Amazon RDS for PostgreSQL database within the Auto Scaling group.
Create an Amazon EFS file system. Configure an Auto Scaling group with a launch template to deploy EC2 instances. Use an Application Load Balancer for traffic distribution. Deploy Amazon ElastiCache for Redis and Amazon RDS for PostgreSQL. Use EC2 instance lifecycle hooks to mount the EFS file system during scale-out events.
Create an Amazon EBS Multi-Attach volume. Deploy the Java application to Elastic Beanstalk with a Network Load Balancer and Auto Scaling. Use .ebextensions to mount the EBS volume. Deploy an Amazon Aurora PostgreSQL database integrated into the Elastic Beanstalk environment.
Explanation
Answer A meets all requirements:
1. NFS-Compatible Storage: Amazon EFS is the only AWS service providing fully managed, scalable NFS storage, required for session data.
2. Scalability: Elastic Beanstalk with Auto Scaling ensures seamless scaling from 5 to 40 EC2 instances during peak traffic.
3. No Application Modifications: Using .ebextensions to mount EFS ensures the storage is attached automatically without code changes.
4. Data Integrity: Aurora PostgreSQL is deployed separately, avoiding data loss risks if the Elastic Beanstalk environment is terminated.
Why other options fail:
- B: EBS Multi-Attach is not NFS-compatible and cannot scale to 40 instances. RDS in an Auto Scaling group is incorrect.
- C: Lifecycle hooks for mounting EFS add complexity and potential failure points, violating the 'no modifications' requirement.
- D: EBS Multi-Attach isn't NFS-compatible. Integrating Aurora into Elastic Beanstalk risks data loss if the environment is deleted.
Key Points:
- Use EFS for shared NFS storage.
- Elastic Beanstalk simplifies deployment and scaling.
- Separate databases (e.g., Aurora) ensure data persistence.
Answer
The correct answer is: A