Lesson 5 of 30
Every AWS resource lives inside a network, whether or not anyone thinks about it — and the difference between 'publicly reachable' and 'not' is a specific, checkable configuration, not a vague sense of exposure.
13 min read
Every option explains itself — why the right one is right, and why each wrong one is wrong. Miss one and it comes back later on a spaced-repetition schedule.
Question 1 of 3
An application server sits in a private subnet but needs to call an external third-party API over the internet. Is this possible?
Hints without spoilers, and a plain explanation of why a wrong answer was wrong — answered only from this lesson. Free account, no card.
Sign up freeWhat interviewers actually ask about this, and what a strong answer has to cover.
A strong answer covers
Likely follow-ups
A VPC (Virtual Private Cloud) is an isolated network within AWS — your own private address space that resources (EC2 instances, RDS databases, Lambda functions if configured to join one) live inside. Three layers of control:
The public subnet: has a route to the internet gateway — the load balancer lives here, reachable from outside.
A typical setup: a load balancer sits in a public subnet (needs to be internet-reachable to accept user traffic), the application servers sit in a private subnet (only need to be reachable from the load balancer, never directly from the internet), and the RDS database sits in an even more restricted private subnet (only reachable from the application servers, on exactly the database port). Each layer's security group only allows traffic from the layer in front of it — the database's security group allows inbound connections on port 5432 only from the application servers' security group, not from 0.0.0.0/0 (anywhere).
0.0.0.0/0 as a security group source means "any IP address on the internet." Seeing it on a database's inbound rule is close to always wrong — it means the database accepts connection attempts from literally anywhere, not just your own application."How would you make sure this database can't be reached directly from the internet?" tests the same instinct as IAM's least privilege, applied to network topology: naming the specific mechanism — private subnet, no internet gateway route, a security group scoped to only the application tier — is a concrete, checkable answer, versus a vague "we'd secure it properly."