Setting the file. One moment.
Skill 24 · Architect For Startups
Subchapter 24.24
references/networking.mdMarkdown7 KBView on GitHub
| Trap | Impact | Fix |
|---|---|---|
| NAT Gateway data processing | $0.045/GB — invisible tax on ALL traffic from private subnets to internet or AWS services | Add S3 + DynamoDB gateway endpoints (free). Add interface endpoints for services with >1GB/month traffic ($7.20/month per endpoint per AZ vs $0.045/GB via NAT) |
| 3 NAT Gateways in dev/staging | $97/month × number of non-prod environments | 1 NAT Gateway for all non-prod. Accept the AZ risk. |
| VPC endpoints “just in case” | $7.20/month per endpoint per AZ — 10 endpoints in 3 AZs = $216/month | Only add interface endpoints when the NAT Gateway data processing cost for that service exceeds the endpoint cost. Breakeven: ~160GB/month per service. |
| Unused Elastic IPs | $3.60/month per unattached EIP (post-Feb 2024: $3.60/month for ALL public IPs including attached) | Audit monthly. Each public IPv4 costs money whether used or not. |
| VPC for serverless workloads | NAT Gateway cost for Lambda/ECS calling AWS services | Use VPC endpoints or keep serverless outside VPC entirely |
Add these FREE endpoints always (zero cost):
Add these PAID endpoints when math justifies (each $7.20/month/AZ):
| Endpoint | Add when… |
|---|---|
| ecr.api + ecr.dkr | Running containers in private subnets (saves ~$5-20/month in NAT data for image pulls) |
| logs | Sending >160GB/month of logs from private subnets |
| secretsmanager | Running in isolated subnets (no NAT alternative) |
| sts | Running in isolated subnets |
| Trigger | Action |
|---|---|
| First SLA commitment (99.9%) | Add 3rd AZ + NAT per AZ |
| NAT data processing >$100/month | Add interface endpoints for top traffic services |
| 3+ VPCs | Transit Gateway |
| SOC2/HIPAA requirement | Isolated subnets + VPC Flow Logs + all endpoints |
| Multi-region requirement | CIDR planning, Transit Gateway Inter-Region |