3

It seems like data transfer costs from S3->EC2, or EC2->EC2, is free if they are in the same AWS region.

S3 price caveat:

You pay for all bandwidth into and out of Amazon S3, except for the following:

• Data transferred out to an Amazon Elastic Compute Cloud (Amazon EC2) instance, when the instance is in the same AWS Region as the S3 bucket.

Source: https://aws.amazon.com/s3/pricing/

EC2 price caveat:

Data transferred between Amazon EC2 [instances]... in the same Availability Zone is free.

Data transferred between Amazon S3... and Amazon EC2 instances in the same AWS Region is free.

Source: https://aws.amazon.com/ec2/pricing/on-demand/

Would this free data transfer pricing apply if the receiving EC2 instance belongs to another company in a separate AWS account? For example:

  • Company A forms a partnership with Company B to send A's data to B
  • Company A's data is stored in an EC2 EBS, or in S3 in N Virginia
  • Company B receive A's data in an EC2 instance in N Virginia

If Company A sends data from the EC2 EBS, or from S3, to Company B, is the data transfer costs still free? Or would Company A have to pay, and if so, what would the cost be?

user3667125
  • 725
  • 1
  • 7
  • 17
  • To send from a private IP in one VPC to a private IP in another VPC, regardless of account, you'd need to use VPC Peering, which itself has a cost. Otherwise you have to send from public IP to public IP, which again has a cost. – jarmod Dec 17 '19 at 02:35
  • I see, so to confirm, this would cost exactly $0.01/GB from both Company A and Company B right? Citing this section of the price page for reference: "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." – user3667125 Dec 17 '19 at 02:40
  • 1
    If you use public IPs or EIPs (or ELB) you'll pay intra-region data transfer even if the instances are in the same AZ, at $0.01/GB in each direction. I think it may also be worth reading https://github.com/open-guides/og-aws#aws-data-transfer-costs – jarmod Dec 17 '19 at 02:57
  • To be clear on the peering costs, there's no charge for peering itself but data transfer across VPC peering connections in the same region is $0.01/GB in each direction. – jarmod Dec 17 '19 at 03:02

1 Answers1

1

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

https://aws.amazon.com/ec2/pricing/on-demand/

So, depend on traffic flow.

Tuan Vo
  • 1,875
  • 10
  • 10
  • Do you mean that (using the example in the original post) Company A must use the public or elastic IPv4 address of Company B's EC2 servers because they are on separate AWS accounts, therefore, the cost is at least $0.01/GB? Are there any other additional costs, or is it only $0.01/GB? – user3667125 Dec 17 '19 at 02:25
  • Depend on how you push/download data. You can create VPC peering from VPC A to VPC B. to transfer data without internet. – Tuan Vo Dec 17 '19 at 02:42
  • I see, thanks. And to confirm, whether I am using public ipv4, elastic ipv4, ipv6, or VPC peering, it will cost $0.01/GB to *both* company A and company B, right? – user3667125 Dec 17 '19 at 02:47
  • Right. A for out, and B for in. (exclude VPC peering. Its free) – Tuan Vo Dec 17 '19 at 02:49
  • 1
    Great, thanks! Before I can accept the solution, there's still one last question -- what about S3? If company A uses data from S3 to transfer into Company B's EC2 server, I wasn't able to find any pricing information related to public IP, elastic IP, or VPC peering. What would the cost be for that? – user3667125 Dec 17 '19 at 02:54
  • Regarding your edit about VPC peering being free, I saw this paragraph in the pricing page that states $0.01/GB. Is there something I'm missing? "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." source: https://aws.amazon.com/ec2/pricing/on-demand/ – user3667125 Dec 17 '19 at 02:55
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/204380/discussion-between-tuan-va-and-user3667125). – Tuan Vo Dec 17 '19 at 03:15
  • 3
    In case this helps anyone else, I reached out to AWS support, and this was the response I got: "Through further research I have found that data transfer costs for transferring data in the same region as well as the same Availability Zone are zero but you must be using a public IP address. If you are using an Elastic IPv4 or IPv6 address, data transfer into/out from EC2 will be $0.01/GB. And data transfer between AWS services in the same region but in different availability zones is considered a regional data transfer and is charged at $0.01/GB." – user3667125 Jan 03 '20 at 01:19
  • @user3667125 you meant "private IP address" for zero data transfer cost for same-region & same-az right across two accounts right? – Yadunandan Batchu Nov 01 '22 at 17:37