BeCuriouzBeCuriouz

Learn something new every day

☁️ Cloud & Infrastructure
🌐

Your VPC is a data center in the cloud — here's why that matters

💡 Put databases in private subnets, and use VPC endpoints instead of NAT Gateways to save money on AWS service calls.

When you create a VPC (Virtual Private Cloud), you're essentially designing a private network inside AWS. You decide the IP ranges, subnets, routing tables, and who can talk to what.

The key insight: public vs. private subnets. Resources in public subnets get internet access via an Internet Gateway. Private subnets use a NAT Gateway for outbound-only internet access — your databases should live here.

Here's a cost trap: NAT Gateways charge per GB of data processed. If your private Lambda functions make lots of API calls, those NAT charges add up fast. Consider VPC endpoints for AWS services — they're cheaper and faster since traffic stays on Amazon's network.

🌐 Your VPC is a data center in the cloud — here's why that matters — BeCuriouz