Handling Inbound Web Traffic for Private EC2 Instances
Short answer
B Provision an internet-facing Application Load Balancer (ALB) in a public subnet to route external HTTP/HTTPS traffic to the private EC2 instance.
Question
Key Takeaways
The core concept tested is network architecture for secure access; the common trap is confusing inbound exposure with outbound connectivity provided by NAT gateways.
This question addresses how to expose web servers running in private subnets to the internet securely. The correct approach involves using an internet-facing Application Load Balancer (ALB) placed in public subnets.
Common mistake: Many learners incorrectly choose Option C (NAT Gateway), misunderstanding that NAT gateways only facilitate outbound traffic from private instances, not inbound connections from the internet.
Expert Analysis
Why the Answer Is Correct
Option B is the correct solution because an internet-facing Application Load Balancer (ALB) is designed specifically to distribute incoming traffic from the internet to targets, such as EC2 instances, in private subnets. By placing the ALB in public subnets, it can receive HTTP/HTTPS traffic on ports 80 and 443 and forward it to the target group containing the private EC2 instances. This setup ensures that the web server remains in a private subnet (enhancing security) while still being accessible externally.
Why the Other Options Are Wrong
Option A is incorrect because Auto Scaling groups manage capacity scaling, not network routing or inbound traffic accessibility. Option C describes a NAT Gateway configuration, which allows instances in private subnets to initiate outbound connections to the internet but does not allow unsolicited inbound connections from the internet. Option D is invalid because an instance in a private subnet lacks a direct public IP address and cannot be reached directly from the internet without a gateway like an ALB or NAT instance (though NAT instances are legacy).
Community Comment Notes
Community consensus strongly favors Option B. As user sandordini noted, "NAT gateway is to allow [outbound] internet traffic, but this is about inbound traffic." Another commenter, LeonSauveterre, explained that "The internet-facing ALB is deployed in a public subnet and acts as a bridge between the internet and the private EC2 instance." Some users initially considered C or D due to confusion about security groups or NAT functionality, but the majority correctly identified the ALB as the necessary component for inbound web traffic.
Official Reference
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
When asked to make a private resource accessible via the internet, always look for a load balancer (ALB/NLB) in a public subnet. Do not confuse this with a NAT Gateway, which is strictly for outbound traffic from private resources.
Frequently Asked Questions
Why can't I just use a NAT Gateway for inbound traffic?
Can an EC2 instance in a private subnet have a public IP?
Community Votes
100% of anonymous learners picked answer B. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 11 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 11
-
sandordini 👍 6 Answered BNot A - Autoscaling Irrelevant B - ALB, route tales for the public subnet with a route to Priv subnet C - "NAT gateway" is "to allow [outbound] internet traffic", but this is about inbound traffic D - Instances are in the private subnet, therefore it wont work from the public.
-
anikolov 👍 5 Answered BB: Provision an internet-facing Application Load Balancer (ALB) in a public subnet makes more sense
-
TruthWS 👍 2B - because ALB do it better NAT
-
LeonSauveterre 👍 1 Answered BA - Auto Scaling groups are for managing instance scaling. B - The internet-facing ALB is deployed in a public subnet and acts as a bridge between the internet and the private EC2 instance. Then, The ALB forwards HTTP/HTTPS traffic to the EC2 instance in the private subnet. C - A NAT gateway provides outbound internet access for private instances, but it does not solve inbound traffic issues. D - Private EC2 instances do not have public IP addresses at all.
-
boluwatito 👍 1 Answered Dnsure that the security group attached to the EC2 instance allows inbound traffic on ports 80 and 443 from the desired sources (e.g., any IP or specific IP ranges). This allows external internet traffic to reach the web server running on the EC2 instance
Show 6 more comments
-
8621a7c 👍 1 Answered CIs the question ask to solve the external connection?
-
Andy_09 👍 1C should be the correct answer
-
mestule 👍 4 Answered BB makes most sense
-
Cali182 👍 1 Answered COption C from Chatgt
-
Andy_09 👍 1Changing to option D
-
waldirlsantos 👍 1Why not "D"?
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →