Reduce scale-out latency with warm pools and lifecycle hooks on a mixed-instances group

Answer Correct answer: D — Use a dynamic scaling policy, enable warm pools, and use lifecycle hooks to run the user data script before instances serve traffic.

A company runs a web application on a single Amazon EC2 instance. End users experience slow application performance during times of peak usage, when CPU utilization is consistently more than 95%. A user data script installs required custom packages on the EC2 instance. The process of launching the instance takes several minutes. The company is creating an Auto Scaling group that has mixed instance groups, varied CPUs, and a maximum capacity limit. The Auto Scaling group will use a launch template for various configuration options. The company needs to decrease application latency when new instances are launched during auto scaling. Which solution will meet these requirements?

  1. Use a predictive scaling policy. Use an instance maintenance policy to run the user data script. Set the default instance warmup time to 0 seconds.
  2. Use a dynamic scaling policy. Use lifecycle hooks to run the user data script. Set the default instance warmup time to 0 seconds.
  3. Use a predictive scaling policy. Enable warm pools for the Auto Scaling group. Use an instance maintenance policy to run the user data script.
  4. Use a dynamic scaling policy. Enable warm pools for the Auto Scaling group. Use lifecycle hooks to run the user data script. Correct Answer

Community Votes

D
78%
B
22%

78% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

Warm pools let the group pre-launch instances into a stopped state and complete their initialization in advance, so scale-out only has to start and resume them, while lifecycle hooks are the supported way to run configuration work during that transition.

A single-instance web application becomes slow at high CPU, and new instances take several minutes to launch because a user data script installs custom packages. The Auto Scaling group uses mixed instance groups, varied CPUs, a maximum capacity limit, and a launch template.

Setting the default instance warmup time to 0 seconds. That only affects how the group evaluates instance health during its default warmup, it does not pre-initialize instances, and it makes the group act on health data sooner, which is the opposite of what a slow-booting fleet needs.

Community Discussion (10 comments)

zhen234 👍 1 Selected: C
An instance maintenance policy in the context of AWS Auto Scaling governs how instances are handled before they are fully launched and available for use. It defines the actions that need to occur (such as running a user data script, applying patches, or installing software) to ensure the instance is ready. When combined with features like warm pools, maintenance policies can ensure instances are prepared in advance and reduce delays during scaling events. These policies help ensure instances are fully initialized before serving traffic.
henrikhmkhitaryan59 👍 1 Selected: B
@songilly provided an exhaustive comment explaining why B is the only viable answer
alexbraila 👍 1 Selected: B
Due to the link in songilly's comment, which clearly states D is out. I am almost sure they were looking for knowledge of "warm pools", but here is another poorly written AWS question
horiuchi 👍 1 Selected: D
No mention of any peak period so there’s no way to use predictive scaling The problem occurs cause the VMs take too long to boot up and be ready to accept requests, the only thing to do is to have them already “warm”. And I’ve never heard of a “maintenance mode” and I know that lifecycle hooks are a common practice with ASGs Warm pools Lifecycle hooks are how
songilly 👍 2
You can't use a warm pool in an Auto Scaling group with mixed instances policy or has spot instances: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html So not sure how D can be write. Although B doesn't seem great it might be the only viable option.
Daniel76 👍 3 Selected: D
Agree with D There is no mention of predictable peak period. Since there's a known metric where user experience skpwness, dynamic scaling should be used. https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scale-based-on-demand.html#:~:text=A%20dynamic%20scaling%20policy%20instructs,CloudWatch%20alarm%20is%20in%20ALARM. Use warm pool to reduce latency and cost of unnecessary standby instance. https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html Use lifecycle hook due to the need to install custom packages https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html More reference: https://aws.amazon.com/blogs/compute/introducing-instance-maintenance-policy-for-amazon-ec2-auto-scaling/
vip2 👍 1 Selected: D
D is correcyt
Alagong 👍 1 Selected: D
Answer : D
AhmedSalem 👍 1 Selected: D
Answer D
kupo777 👍 1
B AWS Database Migration Service can convert Oracle and SQL Server to Amazon RDS for MySQL and Amazon RDS for PostgreSQL stored procedures. D AWS Database Migration Service (AWS DMS) performs data migration. The answer is DB.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Warm pools keep pre-initialized instances in a stopped state, and when scale-out occurs the group starts an instance that has already had its user data work applied, which removes the several-minute launch delay from the request path. Dynamic scaling is the appropriate policy because the requirement is to react to observed load rather than to a forecast, and no peak pattern is given that would justify predictive scaling. Lifecycle hooks provide the documented mechanism for running the configuration script during instance initialization.

Why the Other Options Are Wrong

A and B: Both set the default instance warmup time to 0 seconds, which shortens the period the group waits before evaluating instance health but does nothing to pre-launch or pre-configure instances, so the scale-out latency is unchanged. A additionally uses predictive scaling, which is inappropriate with no forecast pattern to base it on. C: Instance maintenance policies apply to Auto Scaling groups with an instance refresh workflow rather than to a warm pool transition, and warm pools are unsupported for groups using a mixed instances policy, so this option is not viable as written.

Community Comment Notes

The community voted 70 to 20 for D. One commenter raised a valid technical caveat that warm pools cannot be used with a mixed instances policy, which makes the question poorly written, and another confirmed that no peak pattern is given so predictive scaling has nothing to forecast from. A third commenter noted the B variant is the only one left viable if warm pools are excluded, which is why the exam key is D.

Official Reference

Related Analysis

Practice All SAP-C02 Questions

Access 85 questions with complete answers and detailed explanations.

View Full SAP-C02 Practice Test →

← Back to SAP-C02 Study Guide