I am getting used to cloud computing, especially Amazon Web Services (AWS).

AWS has the concept of regions and availability zones. All availability zones of a Region are connected by a special, internal network.

Is this internal network automatically used when I transfer data within a region?

For example: 1) I make a HTTP-GET request from EC2 to S3 to receive a file. 2) I make a HTTP-GET request from EC2 to API Gateway which acts as proxy for S3


What you're describing is defined as "VPC Endpoints" in AWS terminology.

Here's a link that describes it in detail, https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html

Basically, to access API Gtw or S3, you have the option to create an interface endpoint or gateway endpoint, in S3 services case. Otherwise, the traffic leaves the VPC through the firewall in place and is routed back to S3/API public interface.


Inter AZ Traffic

Within an availability zone you're using the internal AWS network if you're using private IP addresses. If you use private IPs traffic between ELB, RDS, Elasticache, S3 and EC2 instances AZs is free. If you use public IPs it's charged.

Most inter-AZ traffic is free, but inter-AZ traffic can be charged. Be careful you don't get caught out, AWS bandwidth is pretty expensive. In general, if you ever need a reverse proxy, look into using AWS Lightsail instances.

Inter-Region Traffic

Traffic between regions is charged, currently at $0.02 / GB. I'm pretty sure this goes over a private AWS network, but you should ensure you encrypt the traffic in transit.

VPC Endpoints

AWS also has the concept of VPC endpoints. This puts a private endpoint in your VPC so traffic to S3 and other public services goes over the AWS network rather than the internet. This increases security and increases performance. I don't think AWS charge for those.

There are other concepts like PrivateLink but I don't want to explain everything about EC2 here.

EC2 Pricing Page

This is from the EC2 pricing page.

Data Transfer within the same AWS Region

Data transferred "in" to and "out" from Amazon EC2, Amazon RDS, Amazon Redshift , Amazon DynamoDB Accelerator (DAX), and Amazon ElastiCache instances or Elastic Network Interfaces across Availability Zones or VPC Peering connections in the same AWS Region is charged at $0.01/GB in each direction.

IPv4: Data transferred “in” to and “out” from public or Elastic IPv4 address is charged at $0.01/GB in each direction. IPv6: Data transferred “in” to and “out” from an IPv6 address in a different VPC is charged at $0.01/GB in each direction.

Data transferred between Amazon EC2, Amazon RDS, Amazon Redshift, Amazon ElastiCache instances and Elastic Network Interfaces in the same Availability Zone is free. See above when transferring data using VPC peering.

Data transferred between Amazon S3, Amazon Glacier, Amazon DynamoDB, Amazon SES, Amazon SQS, Amazon Kinesis, Amazon ECR, Amazon SNS or Amazon SimpleDB and Amazon EC2 instances in the same AWS Region is free. AWS Services accessed via PrivateLink endpoints will incur standard PrivateLink charges as explained here.

Data transferred "in" to and "out" from Amazon Classic and Application Elastic Load Balancers using private IP addresses, between EC2 instances and the load balancer in the same AWS Region is free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.