"Everything in the cloud is open to the internet." No. In AWS, your resources live inside a VPC, and nothing reaches them from the internet unless you build a path for it. Most exposure in the cloud comes from someone opening that path by mistake, not from the cloud being open by default.
Your own isolated network
A VPC (Virtual Private Cloud) is your own logically isolated network inside an AWS Region. You choose its private IP range, written in CIDR notation, such as 10.0.0.0/16.
Pick that range with care. A common mistake is giving every VPC the same range. It works until the day you need to connect two VPCs, or a VPC to your office network. Overlapping ranges can't be routed to each other, and the fix is usually a painful rebuild. Plan non-overlapping ranges from the start.
Subnets: public and private
You slice the VPC into subnets, and each subnet lives in exactly one Availability Zone. For high availability, you create matching subnets in at least two AZs.
- A public subnet has a route to an Internet Gateway. Load balancers and anything that must be reached from the internet go here.
- A private subnet has no route from the internet. Databases and app servers belong here.
What makes a subnet public or private isn't its name. It's the route table.
Route tables and NAT Gateways
Route tables are the traffic signs. Each subnet uses one, and it decides where traffic goes. A route like 0.0.0.0/0 → Internet Gateway is what makes a subnet public.
Private servers still need to go out sometimes, for software updates or to call an external API. A NAT Gateway placed in a public subnet lets them make outbound connections, while nothing on the internet can start a connection to them.
Two practical notes:
- NAT Gateways are charged per hour and per gigabyte processed. Heavy traffic to S3 through NAT can become a surprising line on the bill. A gateway VPC endpoint for S3 or DynamoDB keeps that traffic private and has no extra charge.
- For other AWS services, interface VPC endpoints (AWS PrivateLink) let private servers reach them without going through the internet.
The default VPC
Every Region in your account comes with a default VPC, so you can launch a server right away. It's handy for experiments. But its subnets are public, and instances launched there get a public IP address by default. For production, build your own VPC with clear public and private tiers, ideally defined in infrastructure as code.
Where AI fits
AI workloads handle some of your most sensitive data: customer conversations, internal documents and prompts. You can keep that traffic off the public internet. Amazon Bedrock supports interface VPC endpoints, so apps in private subnets can call models privately. Training and inference jobs in Amazon SageMaker AI can also run inside your VPC. Combine that with tight Security Groups and you have an AI app with no public path to its data.
Quick recap
- A VPC is your private, isolated network in AWS, with an IP range you choose.
- Public subnets route to an Internet Gateway. Private subnets don't.
- Route tables decide where traffic goes. NAT Gateways let private servers go out, and nothing come in.
- Plan non-overlapping IP ranges and use VPC endpoints to keep AWS traffic private.