Skip to content

Does AWS charge regional traffic from ECS to Kinesis?

0

I recently moved an internal service from Kafka to Kinesis - and unexpectedly I saw our bill increase.

Note: When I mention ECS here I am talking about ECS on Fargate.

Our previous architecture was like so: We had an EC2 instance that would forward data to an ECS service, that would then queue that data onto Kafka (on EC2), which would then be processed by another ECS service. The ECS services and Kafka were all in the same AZ, so we only saw data transfer charges from the initial EC2 service into the ECS service.

I then replaced the Kafka instance with Kinesis. I looked up the data transfer charges for ECS which states the following:

Data Transfer: You are billed at standard AWS data transfer rates. [1]

On the transfer rate pages the following information is listed:

Data transferred directly (see endpoints) between Amazon S3, Amazon EBS direct APIs*, 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. If other AWS services are in the path of your data transfer, you will be charged their associated data processing costs. These services include, but are not limited to, PrivateLink endpoints, NAT Gateway and Transit Gateway. [2]

According to this, I would expect there to be no charge from ECS to Kinesis. But this isn't the case.

I would just like some clarity

  1. Is data transfer from ECS Fargate and Kinesis charged at inter-region rates? This is pretty frustrating as you cannot control what region Kinesis uses.
  2. As a confounding factor I am using the dual stack endpoints (I do not have public IPv4 addresses on my ECS Tasks). Does the above information not apply for traffic over IPv6?

I've tried to ask Amazon Support, but it's been nearly a week now and there hasn't been an answer.

[1] https://aws.amazon.com/fargate/pricing/ [2] https://aws.amazon.com/ec2/pricing/on-demand/#Data_Transfer_within_the_same_AWS_Region

3 Answers
0
Accepted Answer

Hello.

Greetings from AWS.

Please allow me to address your concerns:

  1. Is data transfer from ECS Fargate and Kinesis charged at inter-region rates?
  • I would like to inform you that, there are no inter-region charges applied if ECS Fargate and Kinesis are in the same region. The free data transfer applies to both the services as long as they are in the same region.
  1. Does the above information not apply for traffic over IPv6 when using dual stack endpoints?
  • The information applies equally to IPv6 traffic. Using dual stack endpoints or IPv6 does not incur extra charges, and traffic over IPv6 is treated the same as internal IPv4 traffic for pricing.

Kinesis does not charge for data-in/out when producing/consuming with AWS service within the same region.[+]https://aws.amazon.com/kinesis/data-streams/pricing/

However, AWS has introduced charges for using public IPv4 addresses, using IPV6 over IPV4 can help optimizing costs. For more details: (https://aws.amazon.com/blogs/aws/new-aws-public-ipv4-address-charge-public-ip-insights/)

I hope you find the above information helpful.

Thank you.

AWS

answered a year ago

0

Based on the information available, I can clarify a few points about data transfer charges between ECS Fargate and Kinesis.

First, it's important to note that while data transferred directly between certain AWS services (including Kinesis) and EC2 instances in the same region is free, this specific exemption is explicitly mentioned for EC2 instances. ECS Fargate is a different service than EC2, and the pricing rules that apply to EC2 don't automatically extend to Fargate.

For AWS Lambda, the documentation specifically states that "Data transfer with AWS Lambda Functions is free in the same AWS Region between the following services: Amazon Simple Storage Service (S3), Amazon Glacier, Amazon DynamoDB, Amazon Simple Email Service (SES), Amazon Simple Queue Service (SQS), Amazon Kinesis, Amazon Elastic Container Registry (ECR), Amazon Simple Notification Service (SNS), Amazon Elastic File System (EFS), and Amazon SimpleDB." However, there isn't a similar explicit statement for ECS Fargate.

For data transfer within AWS regions, the general rule is:

  • Within the same Availability Zone (AZ): Generally free between certain services
  • Between AZs in the same region: Charged at $0.01/GB in each direction

Since you mentioned your previous setup had all components in the same AZ, but didn't specify if your Kinesis streams are in the same AZ as your Fargate tasks, this could be one explanation for the charges you're seeing. Kinesis is a regional service, and its endpoints might be in different AZs than your Fargate tasks.

Regarding your specific questions:

  1. Data transfer between ECS Fargate and Kinesis within the same region would typically follow the standard regional data transfer pricing, which could include charges for cross-AZ traffic.
  2. The use of dual-stack endpoints (IPv6) shouldn't change the fundamental pricing structure, but it's worth noting that the free data transfer exemptions are often described in documentation with IPv4 connectivity in mind.

To get a definitive answer, continuing to pursue clarification from AWS Support would be the best approach, as they can examine your specific account configuration and usage patterns.
Sources
Is there a data transfer charge when downloading data from S3 bucket to EC2 instance in the same region? | AWS re:Post
EC2 regional data transfer - in/out/between EC2 AZs question. | AWS re:Post
Serverless Computing – AWS Lambda Pricing – Amazon Web Services
Can someone explain data transfer charges in detail? | AWS re:Post

answered a year ago

0

Thank you for your post. It seems according to the cost center and my VPC flow logs, that I am being charged for inter region traffic to Kinesis over IPv6. I've raised this with AWS support.

answered a year ago

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.