An e-commerce company operates an application on AWS where the frontend instances are managed by an Auto Scaling group (ASG). During scheduled flash sales, the company notices that CPU utilization spikes instantly on the active instances, causing the application to become temporarily unresponsive. However, the ASG fails to launch any new instances until exactly minutes after the flash sale starts, despite a target tracking policy being active. The ASG's launch template does not have detailed monitoring enabled.
Which configuration adjustment will resolve the delay in the initial scale-out actions?
- AAdjust the step scaling policy to reduce the scale-out cooldown timer to seconds, allowing immediate scaling when the metric threshold is breached.
- BCreate a custom EventBridge rule that triggers the Auto Scaling policy directly when the scaling metric threshold is exceeded, bypassing the default metric collection latency.
- Enable detailed monitoring in the launch template of the Auto Scaling group so that metrics are sent to Amazon CloudWatch at -minute intervals.Answer
- DAttach an IAM policy with `iam:PassRole` permissions to the IAM instance profile of the EC2 instances, allowing the Auto Scaling service to execute scaling API calls.
Answer
Enable detailed monitoring in the launch template of the Auto Scaling group so that metrics are sent to Amazon CloudWatch at -minute intervals.
Enabling detailed monitoring in the launch template sends EC2 metrics such as CPU utilization to CloudWatch at -minute intervals instead of the default minutes. This reduces the latency of alarm evaluation, permitting target tracking policies to scale out the group much more rapidly during traffic spikes.
Step-by-Step Solution
Key Concept
Standard vs. Detailed CloudWatch Monitoring for Auto Scaling Groups
Estimated Time:1m 30s