A company runs a web application on multiple Amazon EC2 instances that are behind an Application Load Balancer. The operations team wants to ensure that if any EC2 instance fails, a new instance is automatically launched to replace it and maintain a minimum number of running instances. Which AWS service should the company use to meet this requirement?
Amazon EC2 Auto Scaling is the correct service. It automatically adds or removes EC2 instances based on defined policies or to maintain a desired capacity. If an instance fails, Auto Scaling detects the decrease in healthy capacity and launches a new instance to replace it, ensuring the application remains available.
Why this answer
Amazon EC2 Auto Scaling is the correct service because it automatically launches new EC2 instances to replace failed ones and maintains a specified minimum number of running instances. It integrates with the Application Load Balancer to register new instances and deregister failed ones, ensuring the web application remains available. This directly meets the requirement for automatic instance replacement and capacity maintenance.
Exam trap
The trap here is confusing Amazon EC2 Auto Scaling (which directly manages EC2 instance lifecycle and replacement) with AWS Auto Scaling (a broader service for scaling multiple resources), leading candidates to pick D instead of B.
How to eliminate wrong answers
Option A is wrong because AWS Elastic Load Balancing distributes incoming traffic across healthy instances but does not launch new instances or manage instance counts; it only routes traffic to existing instances. Option C is wrong because AWS Lambda is a serverless compute service for running code in response to events, not for managing or replacing EC2 instances; it lacks the lifecycle management and scaling policies needed for EC2 instance replacement. Option D is wrong because AWS Auto Scaling is a service that helps configure scaling plans for multiple resources (e.g., EC2, DynamoDB), but the specific service that directly launches and replaces EC2 instances to maintain a minimum count is Amazon EC2 Auto Scaling; AWS Auto Scaling is a higher-level orchestration service, not the one that performs the actual instance replacement.