A company runs a web application on Amazon EC2 instances in multiple Availability Zones. The EC2 instances are in private subnets. A solutions architect created an internet-facing Application Load Balancer (ALB) and specified the EC2 instances as the target group, but internet traffic is not reaching the instances. How should the architect reconfigure the architecture to fix this?
Choose an answer
Tap an option to check your answer.
Correct answer: Create public subnets in each Availability Zone. Associate the public subnets with the ALB. Update the route tables for the public subnets with a route to the private subnets..
Why this is the answer
The correct solution involves creating public subnets for the ALB and configuring routing. ALBs must be deployed in public subnets to receive internet traffic. The ALB then forwards traffic to the EC2 instances in private subnets. The public subnets' route tables need a route to the private subnets, typically via the local route, to enable this communication. Replacing the ALB with an NLB and using a NAT gateway is incorrect because the NAT gateway is for outbound internet access from private subnets, not for inbound traffic to an ALB. Moving EC2 instances to public subnets is not a best practice for security; instances hosting applications should generally reside in private subnets. Updating route tables for EC2 instance subnets to send 0.0.0.0/0 traffic through an internet gateway would expose them directly to the internet, which is insecure and bypasses the ALB's intended function.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed