Internet Connectivity Costs
What you'll learn: How data transfer charges work when your cloud resources communicate with the internet, and strategies to minimize these costs.
The Hidden Cost of Cloud Networking
When your cloud resources send data to the internet or receive data from it, you're charged for data transfer. Think of it like shipping packages: the cloud provider charges you based on how much data you move and in which direction.
Understanding Data Transfer Pricing
Data coming IN (ingress) is typically free across all major cloud providers. Downloading files to your cloud is like receiving free deliveries to your warehouse.
Data going OUT (egress) is where costs accumulate. Sending data from your cloud resources to the internet costs money—usually tiered pricing where the first few gigabytes per month are free, then rates apply per GB transferred.
NAT Gateway Costs
Remember NAT Gateways from previous lessons? They enable private subnet resources to access the internet. They charge you two ways:
- Hourly fee for running (even if idle)
- Per-GB fee for data processed through them
A NAT Gateway running 24/7 costs roughly $32-45/month before data charges—comparable to running a small compute instance!
Cost Optimization Strategies
- Use VPC endpoints instead of NAT Gateways when accessing cloud services (covered later)
- Cache content closer to users to reduce repeated transfers
- Compress data before sending across the internet
- Schedule large transfers during off-peak times if using NAT Instances instead
- Monitor egress traffic to identify unexpected spikes
Key Takeaway: Internet data transfer costs—especially egress and NAT Gateway usage—can significantly impact your cloud bill; always monitor outbound traffic and use alternatives like VPC endpoints when possible.