Amazon Kinesis uses simple pay as you go pricing. There is neither upfront cost nor minimum fees and you only pay for the resources you use. Amazon Kinesis's pricing is based on two dimensions: Shard Hour and PUT Record.
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 PUT 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 a unit of data that your data producer adds to your Amazon Kinesis stream. PUT record is charged with a per million PUT records rate.
* Data transfer is free. AWS does not charge for data transfer from your data producers to Amazon Kinesis, or from Amazon Kinesis to your Amazon Kinesis Applications.
* Please note that Amazon Kinesis 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 1000 records per second in aggregate, and each record is 5KB. In this case, the total data input rate is 4.9MB/sec (1000 PUT records/sec*5KB/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 PUT records/sec, five shards provide a capacity of 5MB/sec data input and support 5000 PUT records/sec. So a stream with five shards satisfies our required throughput of 4.9MB/sec at 1000 PUT records/sec.
We then calculate our monthly Amazon Kinesis costs using Amazon Kinesis 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 five shards so that it costs $1.80 per day ($0.36*5). For a month with 31 days, our monthly Shard Hour cost is $55.80 ($1.80*31).
- PUT Record: One million PUT records costs $0.028. Our data producers put 1000 records per second in aggregate, which equals to 86,400,000 PUT records per day, or 2,678,400,000 PUT records per month. Our monthly PUT Record cost is $74.99 ($0.028*2,678.4).
Adding the Shard Hour and PUT Record costs together, our total Amazon Kinesis costs are $4.22 per day, or $130.8 per month. For $4.22 per day, we have a fully-managed streaming data infrastructure that enables us to continuously ingest 5MB of data per second, or 421GB of data per day in a reliable and elastic manner.
Batching small records on data producers to Amazon Kinesis's 50KB per record limit could result in significant savings on PUT Record cost. Considering the Pricing Example above, batching every ten 5KB records to one 50KB record reduces records volume to 100 records per second. In turn, PUT Record cost is reduced to $7.499 per month from $74.99 per month, which is a 90% cost saving on PUT Record.