AWS SAP-C02 · Question 47 · Domain 3.4: Reliability Improvement
A company is designing a highly available architecture for a stateful legacy application. The application runs on EC2 instances and stores session state on the local EBS volumes. The application cannot be rewritten to use an external session store (like ElastiCache). The architecture must ensure that if an EC2 instance fails, a new instance is launched and the exact same EBS volume (with the session state) is attached to it automatically. Which combination of services and features should be used? (Select TWO)
Answer options:
Use an Amazon EC2 Auto Scaling group with a minimum and maximum size of 1.
Create an AWS Lambda function triggered by EventBridge (EC2 instance state change) to detach the EBS volume from the failed instance and attach it to the new instance.
Use Amazon EFS instead of EBS and mount it to the Auto Scaling group via user data.
Configure the Auto Scaling group to use an EBS snapshot lifecycle policy to restore the volume.
Use AWS Elastic Beanstalk with persistent storage enabled.
Enable EBS Multi-Attach on the volume and attach it to all instances in the Auto Scaling group.
75 questions · hints · full answers · grading