Skip to content

Global-DataTransfer-Regional-Bytes for a Specific API

0

I noticed my east-us-1 EC2 instance was approaching 1GB intra region data transfer limit. Given I didn't have any other AWS services and I was calling an Internet API I was did not understand these charges since Internet to AWS is free. I did a bit of digging and noticed this ...

The API I am accessing is financialmodelingprep.com and anything I downloaded from this was adding to the DataTransfer-Regional-Bytes but not other sites

To test ..

Downloaded these between 15:00 - 16:00 UTC with a total of 3.10 + 8.70 + 12.00 + 0.20 = 24.00 MB
curl https://dlcdn.apache.org/maven/maven-3/3.9.9/binaries/apache-maven-3.9.9-bin.tar.gz > file.tgz
curl https://www.cnn.com > cnn.txt
curl https://www.microsoft.com > microsoft.txt
curl https://downloads.apache.org/kafka/3.7.1/kafka-3.7.1-src.tgz > kafka-3.7.1-src.tgz

and the API between 16:00 - 17:00 UTC with data of 12 MB
curl -G https://financialmodelingprep.com/api/v3/available-traded/list -d "apikey=?" > data.json

These are the downloaded files
-rw-r--r--. 1 ec2-user ec2-user 3.1M Sep 6 15:32 cnn.txt
-rw-r--r--. 1 ec2-user ec2-user 12M Sep 6 16:05 data.json
-rw-r--r--. 1 ec2-user ec2-user 8.7M Sep 6 15:29 file.tgz
-rw-r--r--. 1 ec2-user ec2-user 12M Sep 6 15:37 kafka-3.7.1-src.tgz
-rw-r--r--. 1 ec2-user ec2-user 197K Sep 6 15:32 microsoft.txt

This is the usage
Service Operation UsageType StartTime EndTime UsageValue
AmazonEC2 PublicIP-In DataTransfer-Regional-Bytes 9/6/2024 14:00 9/6/2024 15:00 1140
AmazonEC2 PublicIP-In DataTransfer-Regional-Bytes 9/6/2024 15:00 9/6/2024 16:00 988 <-- no public IP In here data volume here
AmazonEC2 PublicIP-In DataTransfer-Regional-Bytes 9/6/2024 16:00 9/6/2024 17:00 12697872 <-- public IP In for the API
AmazonEC2 PublicIP-In DataTransfer-Regional-Bytes 9/6/2024 17:00 9/6/2024 18:00 1064
AmazonEC2 PublicIP-In DataTransfer-Regional-Bytes 9/6/2024 18:00 9/6/2024 19:00 1064

A traceroute to the service showed a single hop
traceroute to financialmodelingprep.com (3.210.122.99), 30 hops max, 60 byte packets
1 244.5.5.139 (244.5.5.139) 8.013 ms
2 ec2-3-210-122-99.compute-1.amazonaws.com (3.210.122.99) 1.326 ms

Checking https://www.iplocation.net/ip-lookup I believe all the API IPs are in us-east-1. When my EC2 was in west us I didn't get these charges.

It seems weird to be paying for charges because someone else hosted their site in AWS Virginia given I am accessing it via their public link. Does anyone know if this is by design or a defect?

asked a year ago146 views
1 Answer
0

Hi there,

To get a better understanding of data transfer costs, please take a look at this doc: https://docs.aws.amazon.com/cur/latest/userguide/cur-data-transfers-charges.html.

Please be advised that if your resources are public there's always the chance you will incur charges.

We highly recommend reaching out to our Billing support team to see if they can shed more light on this matter for you: http://go.aws/support-center. Bear in mind their assistance could be limited due to the fact customer activity is encrypted.

— Rafeeq C.

AWS
EXPERT
answered a year ago
EXPERT
reviewed a year ago
  • I have read that link and also contacted billing support but the assistance has been limited. They are only able to provide info I already know. I understand where the charges are coming from but it seems weird that AWS penalizes customers for using public API (not owned by them) just because they happen to be hosted by the API providers in the same region as the consuming customer.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.