Question #1354
A company must quickly scale its application using Amazon EC2 instances launched from an Amazon Machine Image (AMI) within an Auto Scaling group during unexpected traffic surges. The solution needs to minimize the time required to initialize new instances.
Which strategy achieves this goal?
Create an AMI using the AWS CLI ec2 create-image command with an existing EBS snapshot. Use AWS Systems Manager Automation to update the Auto Scaling group with the new AMI.
Activate Amazon EBS fast snapshot restore for a specific snapshot. Generate an AMI from the snapshot and update the Auto Scaling group to use the new AMI.
Configure Amazon Data Lifecycle Manager (DLM) to automate AMI creation schedules. Use an AWS Lambda function triggered by CloudWatch alarms to deploy the latest AMI in the Auto Scaling group.
Use Amazon EventBridge rules to trigger AWS Backup for AMI creation. Integrate the Auto Scaling group with AWS AppConfig to dynamically adjust instance launch configurations.
Explanation
Answer B is correct because Amazon EBS fast snapshot restore (FSR) enables immediate access to data in a snapshot, bypassing the typical latency of initializing EBS volumes from snapshots. By enabling FSR on the specific snapshot used to create the AMI, new EC2 instances launched from this AMI will have their EBS volumes ready instantly, significantly reducing instance initialization time. This directly addresses the requirement to minimize scaling delays during traffic surges.
Other options are incorrect because:
- A: While creating an AMI from a snapshot is valid, it does not address the snapshot restore latency. Systems Manager Automation updates the ASG but does not optimize initialization speed.
- C: Automating AMI creation with DLM ensures updated AMIs but does not resolve the snapshot restore delay unless FSR is applied.
- D: AWS Backup and AppConfig manage AMI creation and configurations but do not reduce EBS volume initialization time.
Key Points:
- EBS fast snapshot restore (FSR) ensures instant volume availability.
- FSR must be enabled on the snapshot used by the AMI.
- Minimizing EC2 launch time is critical for rapid scaling during traffic spikes.
Answer
The correct answer is: B