Migrate a Linux CMS site to Elastic Beanstalk with EFS and a separate Aurora MySQL
A company needs to migrate its website from an on-premises data center to AWS. The website consists of a load balancer, a content management system (CMS) that runs on a Linux operating system, and a MySQL database. The CMS requires persistent NFS-compatible storage for a file system. The new solution on AWS must be able to scale from 2 Amazon EC2 instances to 30 EC2 instances in response to unpredictable traffic increases. The new solution also must require no changes to the website and must prevent data loss. Which solution will meet these requirements?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
Only EFS provides the NFS shared mount the CMS requires across an Auto Scaling group, and .ebextensions mounts it at instance launch so scaling out automatically attaches the file system to every new instance.
An on-premises load balancer, Linux CMS, and MySQL database must move to AWS. The CMS needs persistent NFS-compatible shared storage, the site must scale from two to thirty instances without changes, and the solution must prevent data loss.
Trying to attach shared storage with an Auto Scaling scale-in lifecycle hook. Mounting EFS is a startup action, so it belongs in the launch process via .ebextensions, not in a lifecycle hook that fires when an instance is being removed.
Community Discussion (10 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Amazon EFS is an NFS file system that many instances can mount at once, which satisfies the CMS requirement and eliminates the data loss risk of instance-local storage. Deploying the CMS to Elastic Beanstalk with an Application Load Balancer and an Auto Scaling group provides the required scaling, and.ebextensions commands run on every instance launch to mount the EFS file system. The Aurora MySQL database is created outside the Elastic Beanstalk environment so that it survives environment replacements and swapouts.Why the Other Options Are Wrong
B: The CMS requires NFS-compatible storage and EBS is not NFS-compatible, so an EBS Multi-Attach volume cannot be mounted as the CMS file system. C: A scale-in lifecycle hook fires when an instance is being terminated, so using it to mount EFS is logically inverted, mounting must happen when the instance starts. D: ElastiCache for Redis is an in-memory cache and cannot support a MySQL database, and EBS Multi-Attach is again not NFS.Community Comment Notes
The community voted 93 to 3 for A. The main pushback on C was that a lifecycle hook cannot mount a file system, since mounting belongs to the scale-out path rather than the scale-in path.Official Reference
Related Analysis
Practice All SAP-C02 Questions
Access 85 questions with complete answers and detailed explanations.
View Full SAP-C02 Practice Test →