AWS Certified Solutions Architect - Associate / Question #1264 of 1019

Question #1264

A company is deploying a web application on AWS using an Application Load Balancer (ALB) to distribute traffic across Amazon EC2 instances in a target group. Each environment (development and production) has a separate Auto Scaling group. The production environment must scale dynamically during traffic spikes, while the development environment should prioritize cost efficiency. The ALB requires a minimum of two healthy instances in the target group at all times.

Which solution MOST cost-effectively configures the development environment while meeting the ALB's operational requirements?

A

Use Spot Instances for the development environment's EC2 instances to reduce costs.

B

Set the development environment's Auto Scaling group maximum capacity to 2 instances.

C

Reduce the size of the EC2 instances in the development environment.

D

Reconfigure the ALB in the development environment to use a single target group across both environments.

Explanation

The correct answer is B. The ALB requires a minimum of two healthy instances, and the development environment must prioritize cost efficiency. By setting the Auto Scaling group's maximum capacity to 2, the environment maintains exactly two instances at all times, avoiding scaling costs while meeting the ALB's operational requirement.

- Option A (Spot Instances): While cost-effective, Spot Instances can be interrupted, risking the ALB's minimum healthy instance requirement.
- Option C (Smaller Instances): Reduces per-instance cost but does not prevent scaling, potentially increasing total costs if the ASG scales out.
- Option D (Single Target Group): Mixing environments violates isolation requirements and does not guarantee per-environment ALB health checks.

Key Points: ALB health requirements take precedence; development environments should minimize scaling; Auto Scaling group limits enforce cost control without compromising availability.

Answer

The correct answer is: B