AWS Certified SysOps Administrator – Associate (legacy) — Question 543

A company needs to deploy a web application on two Amazon EC2 instances behind an Application Load Balancer (ALB). Two EC2 instances will also be deployed to host the database. The infrastructure needs to be designed across Availability Zones for high availability and must limit public access to the instances as much as possible.
How should this be achieved within a VPC?

Answer options

Correct answer: C

Explanation

To achieve high availability across multiple Availability Zones, the Application Load Balancer (ALB) must be deployed across at least two public subnets. To minimize public exposure as required, both the web application EC2 instances and the database EC2 instances should be placed in private subnets, allowing public traffic to enter only through the ALB. Placing any EC2 instances in public subnets unnecessarily increases the attack surface and violates security best practices.