Amazon Kinesis Streams uses simple pay as you go pricing. There is neither upfront cost nor minimum fees and you only pay for the resources you use. Pricing is based on two core dimensions - Shard Hour and PUT Payload Unit, and an optional dimension – Extended Data Retention.
Estimate your monthly bill using the AWS Simple Monthly Calculator.
Shard is the base throughput unit of an Amazon Kinesis stream. One shard provides a capacity of 1MB/sec data input and 2MB/sec data output. One shard can support up to 1000 records per second. You specify the number of shards needed within your stream based on your throughput requirements. You are charged for each shard at an hourly rate.
A record is the data that your data producer adds to your Amazon Kinesis stream. A PUT Payload Unit is counted in 25KB payload “chunks” that comprise a record. For example, a 5KB record contains one PUT Payload Unit, a 45KB record contains two PUT Payload Units, and a 1MB record contains 40 PUT Payload Units. PUT Payload Unit is charged with a per million PUT Payload Units rate.
Amazon Kinesis stores your data for 24 hours by default. You can choose to increase the data retention period of your stream to up to 7 days. You are charged for an additional rate on each shard hour incurred by your stream once you enable extended data retention.
* Getting records from Amazon Kinesis stream is free.
* Data transfer is free. AWS does not charge for data transfer from your data producers to Amazon Kinesis Streams, or from Amazon Kinesis Streams to your Amazon Kinesis Applications.
* Please note that Amazon Kinesis Streams is NOT currently available in AWS Free Tier. AWS Free Tier is a program that offers free trial for a group of AWS services. For more details about AWS Free Tier, see AWS Free Tier.
Let’s assume that our data producers put 100 records per second in aggregate, and each record is 35KB. In this case, the total data input rate is 3.4MB/sec (100 records/sec*35KB/record). For simplicity, we assume that the throughput and data size of each record are stable and constant throughout the day. Please note that we can dynamically adjust the throughput of our Amazon Kinesis stream at any time.
We first calculate the number of shards needed for our stream to achieve the required throughput. As one shard provides a capacity of 1MB/sec data input and supports 1000 records/sec, four shards provide a capacity of 4MB/sec data input and support 4000 records/sec. So a stream with four shards satisfies our required throughput of 3.4MB/sec at 100 records/sec.
We then calculate our monthly Amazon Kinesis Streams costs using Amazon Kinesis Streams pricing in the US-East Region:
- Shard Hour: One shard costs $0.015 per hour, or $0.36 per day ($0.015*24). Our stream has four shards so that it costs $1.44 per day ($0.36*4). For a month with 31 days, our monthly Shard Hour cost is $44.64 ($1.44*31).
- PUT Payload Unit (25KB): As our record is 35KB, each record contains two PUT Payload Units. Our data producers put 100 records or 200 PUT Payload Units per second in aggregate. That is 267,840,000 records or 535,680,000 PUT Payload Units per month. As one million PUT Payload Units cost $0.014, our monthly PUT Payload Units cost is $7.499 ($0.014*535.68).
Optionally, we can choose to increase the data retention period of our stream from 24 hours to up to 7 days. In this example, we assume that our stream has extended data retention enabled throughout the whole month. Alternatively, we can choose to enable extended data retention only during occasions when extended data retention is critical for preventing data loss, which saves our cost on extended data retention.
- Extended Data Retention (Up to 7 days): Extended data retention costs an extra $0.020 per shard hour. As our stream incurs 2,976 shard hours per month (4 shards*24 hours/day*31 days/month), our monthly Extended Data Retention cost is $59.52($0.020*2,976)
Adding the Shard Hour and PUT Payload Unit costs together, our total Amazon Kinesis Streams costs are $1.68 per day, or $52.14 per month. For $1.68 per day, we have a fully-managed streaming data infrastructure that enables us to continuously ingest 4MB of data per second, or 337GB of data per day in a reliable and elastic manner. Additionally, we can increase our Amazon Kinesis stream’s data retention period from 24 hours to up to 7 days for an extra $59.52 per month.