Q42 — AWS DOP-C02 Ch.1

Question 42 of 100 | ← Chapter 1

A company runs an application on Amazon EC2 instances within an Auto Scaling group. When the application starts, it must process data from an Amazon S3 bucket before it can begin handling requests. The volume of data stored in the S3 bucket is growing. When the Auto Scaling group adds new instances, the application now takes several minutes to download and process the data before it can serve requests. The company wants to reduce the time required for new EC2 instances to be ready to serve requests.

Correct Answer: A. Configure a warm pool for the Auto Scaling group, where warm EC2 instances are in the stopped state. Configure an Auto Scaling:EC2_INSTANCE_LAUNCHING lifecycle hook on the Auto Scaling group. Modify the application to complete the lifecycle hook when it is ready to serve requests.

Explanation

The warm pool feature of Auto Scaling groups allows pre-provisioning EC2 instances in the stopped state, enabling faster recovery than launching new instances from scratch. The EC2_INSTANCE_LAUNCHING lifecycle hook delays an instance’s entry into service until the application completes initialization. Option A leverages stopped-state warm pool instances (billed at lower cost) combined with the lifecycle mechanism to ensure traffic is routed only after application readiness—reducing startup latency while avoiding ongoing costs of running instances. Other options either increase redundant instance count (B/D), raising cost, or use running warm pools (C), incurring higher expenses, failing the cost-efficiency objective.