0
votes

I have two EC2 instances behind one Classic Load Balancer.

I have one domain (example.com) which points to ELB.

I have the traffic coming from web client as well as from within my application.

I want to understand if I make a call (in code) from EC2 instance to example.com, what will be the data transfer cost for such calls?

i.e. will this be considered as Internet Outbound Transfer or Within VPC transfer?

1
From which EC2 instance are you making the call? Is this one of the instance behind the Load Balancer? Is it from the same VPC or a different VPC? Same region?John Rotenstein
@JohnRotenstein Both instances are in the same VPC and in the same region and both instances are behind the load balancerDevendra
If you are calling public DNS name, it will translate into a Public IP address, which will go "out" of the VPC, but then straight back in. This will result in a $0.01/GB charge. If you address resources within the VPC by their Private IP address, there will only be $0.01/GB charge if the traffic goes across AZs.John Rotenstein

1 Answers

0
votes

There are two different conditions in EC2 data transfer pricing.

Data transfer between EC2-ELB

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.

Data transfer within the same AWS region using public IP

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

If you don't use split-horizon DNS and access the URL through the Internet, I expect that you will be charged $0.01/GB based on these two statements.