open-guides / og-aws

📙 Amazon Web Services — a practical guide
Creative Commons Attribution 4.0 International
35.73k stars 3.88k forks source link

Bandwidth cost between EC2 and S3 #411

Open maximrozin opened 7 years ago

maximrozin commented 7 years ago

The bandwidth cost diagram does not include the NAT Gateway. Traffic from an EC2 instance in a private subnet to S3 is not free. It is charged on the NAT Gateway like "internet" traffic, unless you have a VPC Endpoint for S3 attached.

QuinnyPig commented 7 years ago

That doesn't match my understanding; can you help me see how you're arriving at this conclusion? I'm probably missing something!

From https://aws.amazon.com/vpc/pricing/:

"Data Transfer Charge: This is the standard EC2 Data Transfer charge. 1 GB data was transferred from the EC2 instance to S3 via the NAT gateway. There was no charge for the data transfer from the EC2 instance to S3 as it is Data Transfer Out to Amazon EC2 to S3 in the same region. There was also no charge for the data transfer between the NAT Gateway and the EC2 instance since the traffic stays in the same availability zone using private IP addresses. There will be data transfer charge between your NAT Gateway and EC2 instance if they are in the different availability zone. Please visit the Data Transfer section of the EC2 Pricing Page for more details."

senorkrabs commented 5 years ago

Agree with @maximrozin, per https://aws.amazon.com/vpc/pricing/:

NAT Gateway Data Processing Charge: 1 GB data went through NAT gateway. The NAT Gateway Data Processing charge is applied and will result in a charge of $0.045.