Hard1 markMultiple Choice
Domain 2.4: ReliabilityReliabilityAuto ScalingEBS

AWS SAP-C02 · Question 40 · Domain 2.4: Reliability

A company is designing a highly available architecture for a stateful legacy application. The application runs on a single EC2 instance and stores session data locally on its EBS volume. The application cannot be refactored. How can the architect ensure that if the EC2 instance fails, the application is automatically recovered with its session data intact?

Answer options:

A.

Use Amazon EFS instead of EBS for the session data.

B.

Put the EC2 instance in an Auto Scaling group with a minimum and maximum size of 1. Configure a lifecycle hook to attach the existing EBS volume to the new instance upon launch.

C.

Enable EC2 Auto Recovery. If the instance fails, Auto Recovery will migrate the instance to new hardware with the EBS volume attached.

D.

Use AWS Backup to take continuous snapshots and restore them automatically using AWS CloudFormation.

How to approach this question

Find a way to maintain state with an ASG of 1.

Full Answer

B.Put the EC2 instance in an Auto Scaling group with a minimum and maximum size of 1. Configure a lifecycle hook to attach the existing EBS volume to the new instance upon launch.✓ Correct
Put the EC2 instance in an Auto Scaling group with a minimum and maximum size of 1. Configure a lifecycle hook to attach the existing EBS volume to the new instance upon launch.
An Auto Scaling group with a size of 1 ensures high availability. Because the app is stateful, a lifecycle hook can be used to trigger a Lambda function that detaches the EBS volume from the failed instance and attaches it to the newly launched instance.

Common mistakes

Relying on EC2 Auto Recovery, which doesn't protect against OS-level failures.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 7

75 questions · hints · full answers · grading

More questions from this exam