Amazon Kinesis Data Streams is a fully managed, serverless streaming data service that makes it easy to elastically ingest and store logs, events, clickstreams, and other forms of streaming data in real time. Kinesis Data Streams uses simple pay-as-you-go pricing. There are no upfront costs or minimum fees, and you pay only for the resources you use. Kinesis Data Streams has two capacity modes—on-demand and provisioned—and both come with specific billing options. Click the following tabs to learn more about these options.
-
On-Demand Mode
-
Provisioned Mode
-
On-Demand Mode
-
With on-demand capacity mode, you pay per GB of data written and read from your data streams. You do not need to specify how much read and write throughput you expect your application to perform. Kinesis Data Streams instantly accommodates your workloads as they ramp up or down.
In on-demand mode, pricing is based on the volume of data ingested and retrieved along with a per-hour charge for each data stream in your account. There are additional charges for optional features: Extended data retention (beyond the first 24 hours and within the first seven days), Long-Term data retention (beyond seven days and up to one year), and Enhanced Fan-Out. You’re also charged for each stream operating in the on-demand capacity mode in your account at an hourly rate.
On-demand capacity mode might be best if you create new data streams with unknown workloads, have unpredictable application traffic, or prefer not to manage capacity.
Key terms
Data-In: The data ingested into Kinesis Data Streams is billed per GB written into your data stream. This is calculated as the number of data records you send to the service, multiplied by the size of each record rounded up to the nearest 1 KB (1,024 bytes). For example, if your data records are 4.5 KB each, Kinesis Data Streams will count each record as 5 KB of data ingested. All the data ingested into Kinesis Data Streams is stored for 24 hours by default, and there are no additional charges.
Data-Out: The data retrieved from Kinesis Data Streams is billed per GB read from a data stream. This is calculated as the number of records retrieved multiplied by the size of each record. There is no rounding factor applied for this calculation. If your data records are 4.5 KB each, Kinesis Data Streams will count each one as 4.5 KB of data egressed.
Per-Stream: You’re charged for each stream operating in the on-demand capacity mode in your account at an hourly rate.
Extended data retention: Kinesis Data Streams stores your data for 24 hours by default. Extended data retention gives you the option to extend the storage up to seven days. You’re charged a GB- month rate for data stored beyond 24 hours, up to seven days.
Long-term data retention: Long-term data retention gives you the option to store your data stream up to 365 days. You’re charged extended data retention rates for the first seven days and then charged a lower GB-month rate for data stored beyond seven days up to your specified retention period.
Enhanced fan-out: Enhanced fan-out improves read parallelism by providing each data consumer with their own read throughput per shard, up to 2 MB/second. When consumers use enhanced fan-out, they incur additional charges per GB of data retrieved.
Pricing by Region
Pricing example
Let’s assume you send 1,000 records of streaming data per second, each record 3 KB in size, to an Amazon Kinesis Data Stream operating in on-demand capacity mode in US-East. You want to retain data for one day and process it using a single consumer. Your monthly charges are calculated as follows:
Record size of 3 KB, rounded up to the nearest 1 KB = 3 KB
Data ingested (GB per sec) = (1,000 records/sec * 3 KB/record) / 1,048,576 KB/GB = 0.00286 GB/sec
Data ingested (GB per month) = 30 days/month * 86,400 sec/day * 0.00286 GB/sec = 7,413.12 GB/month
Since you have one consumer:
Data retrieved (GB per sec) = 1 (consumer) * (1,000 records/sec * 3 KB/record) / 1,048,576 KB/GB = 0.00286 GB/secData retrieved (GB per month) = 30 days/month * 86,400 sec/day * 0.00286 GB/sec = 7,413.12 GB/month
One-day retention is included in Data-Ingested charges.
The price in US-East is $0.08 per GB of data ingested
Data-in monthly charges = 7,413.12 GB * $0.08/GB = $593.04
The price in US-East is $0.040 per GB of data retrievals
Data-out monthly charges = 7,413.12 GB * $0.040/GB = $296.50
Since the stream is for used for 30 days in the month:
Per-stream charges = 30 * 24 * 0.040 (rate) = $28.80Total monthly charges = $593.04 + $296.50 + $28.80 = $918.34
-
Provisioned Mode
-
With provisioned capacity mode, you specify the number of shards necessary for your application based on its write and read request rate. A shard is a unit of capacity that provides 1 MB/second of write and 2 MB/second of read throughout.
Provisioned capacity mode might be best if you have predictable application traffic, run applications whose traffic is consistent or ramps gradually, or can forecast capacity requirements to control costs.
Key terms
Shard hour: Shard is the base throughput unit of an Amazon Kinesis data stream. You specify the number of shards needed within your stream based on your throughput requirements. You’re charged for each shard at an hourly rate.
One shard provides an ingest capacity of 1 MB/second or 1,000 records/second.
When data consumers use enhanced fan-out, each shard provides up to 2 MB/second of data output for each consumer using it.
When data consumers do not use enhanced fan-out, each shard provides up to 2 MB/second of data output, regardless of the number of consumers processing data in parallel from a shard.
PUT Payload Unit (25 KB): A record is the data that your data producer adds to your Amazon Kinesis data stream. A PUT Payload Unit is counted in 25 KB payload “chunks” that comprise a record. For example, a 5 KB record contains one PUT Payload Unit, a 45 KB record contains two PUT Payload Units, and a 1 MB record contains 40 PUT Payload Units. PUT Payload Unit is charged a per-million PUT Payload Units rate.
Enhanced fan-out: Enhanced fan-out improves read parallelism by providing each data consumer with their own read throughput per shard (up to 2 MB/second). When consumers use enhanced fan-out, they incur hourly charges per consumer-shard hour and per GB of data retrieved.
Extended data retention: Kinesis Data Streams stores your data for 24 hours by default. Extended data retention gives you the option to extend the storage up to seven days. Once you start extended data retention, you’re charged for an additional rate on each shard hour incurred by your data stream.
Long-term data retention: Long-term data retention gives you the option to store your data stream up to 365 days. You’re charged extended data retention rates for the first seven days and then charged a GB-month rate of data stored beyond seven days up to your specified retention period.
Retrieval of long-term retention data: You’re charged a per-GB rate for retrieval of data stored beyond seven days if you are retrieving data using GetRecords API. You’re not charged for retrieval of data stored for the 24-hour default or for extended data retention up to seven days. You’re not charged for long-term data retrieval if enhanced fan-out consumer (SubscribeToShard API) is used.
Pricing by Region
Pricing example
Let’s say that your data producers put 100 records per second in aggregate, and each record is 35KB. In this case, the total data input rate is 3.4 MB/second (100 records/sec * 35KB/record divided by 1,024 = 3.4 MB/sec). 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 the Amazon Kinesis stream at any time.
We first calculate the number of shards needed for your stream to achieve the required throughput. As one shard provides a capacity of 1 MB/sec data input and supports 1,000 records/sec, four shards provide a capacity of 4 MB/sec data input and support 4,000 records/sec. So a stream with four shards satisfies our required throughput of 3.4 MB/sec at 100 records/sec.
We then calculate our monthly Kinesis Data Streams costs using 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, the 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. Your 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 1 million PUT Payload Units cost $0.014, your monthly PUT Payload Units cost is $7.499 ($0.014 * 535.68).
Optionally, we can choose to increase the data retention period of the stream from 24 hours to up to seven days. In this example, we assume that the data stream has extended data retention enabled throughout the whole month. Alternatively, you can choose extended data retention only in times when it’s critical to prevent data loss, which saves your cost on the extended retention.
Extended Data Retention (up to seven 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), your monthly extended data retention cost is $59.52 ($0.020 * 2,976)
Adding the shard hour and PUT Payload Unit costs together, the total Amazon Kinesis Data Streams costs are $1.68 per day, or $52.14 per month. For $1.68 per day, you have a fully managed streaming data infrastructure that enables us to continuously ingest 4 MB of data per second, or 337 GB of data per day, in a reliable and elastic manner. Additionally, you can increase your retention period from 24 hours to up to seven days for an extra $59.52 per month.
You can also optional retaining data longer than seven days and use enhanced fan-out.
Long-term data retention (data older than seven days): Let’s assume that you want to retain your data stream for 30 days. You will incur extended data retention shard-hour pricing from 24 hours up to seven days (see above for calculations) and long-term data retention pricing beyond seven days to 30 days (a 23-day period). For long-term retention pricing of 23 days, it costs an additional $0.023/GB-month for storage and $0.021 per GB for data retrievals if you use the default consumer (GetRecords API). Based on a data input rate of 3.4 MB/second, you’ll accumulate 3.4 (input rate) * 1,024 * 1,024 * 3,600 = 12,902,400,000 bytes in an hour.
At the end of the month, you’ll have the following usage:
3,565,158 * 23 days * 24 hours/day = 7,122,124,800,000 byte-hours
Let’s convert that to GB-month:
7,122,124,800,000 byte-hours / 1,073,741,824 bytes per GB = 6,633 GB per monthSo the total storage costs for 23-day retention = 6,633* $0.023 = $152.56 per month.
Long-term data retrieval (data older than seven days): If you retrieve all long-term data using a single consumer that uses GetRecords API to fetch records, you’ll incur retrieval charges only for the data stored beyond the first seven days. Since you’re retrieving 6,623 GB of data, you’ll be charged 6,623 * 0.021 = $139.08 at the end of the month. Long-term data retrieved using enhanced fan-out consumers incur enhanced fan-out data retrieval rates as described below.
Enhanced fan-out consumer-shard hours: Enhanced fan-out costs an extra $0.015 per shard, and this cost is additive per data consumer. As your stream incurs 2,976 shard hours per month (4 shards * 24 hours/day * 31 days/month), each consumer using enhanced fan-out throughout this period will incur a cost of $44.64 (2,976 * $0.015). Two consumers over the same period would incur a cost of $89.28.
Enhanced fan-out data retrievals: Data retrieved from a stream by a consumer using enhanced fan- out incurs a charge of $0.013 per GB. If, over a month, a two-shard stream ingested 50,000 MB of data, and two data consumers used enhanced fan-out and retrieved all of this data during the month, the total data retrieved would be 100,000 MB (50,000 MB * 2 consumers) or 97.6 GB. Since each GB costs $0.013, the total enhanced fan-out cost is $1.26 (97.6 * $0.013).
* Getting records from an Amazon Kinesis data stream is free when the data is stored for the 24-hour default or up to 7 days for extended data retention. You are charged a per-GB rate for retrieval of data stored for long-term retention beyond 7 days up to the limit of 365 days.
* If you choose to use enhanced fan-out, you incur hourly charges per consumer-shard hour and per GB of data retrieved.
* AWS does not charge for data transfer from your data producers to Amazon Kinesis Data Streams, or from Amazon Kinesis Data Streams to your consuming applications if all the resources are in the same region.
* AWS does not charge for data transfer if your data producers are writing to a Kinesis Data Stream in a different region. However, in the on-demand mode you incur additional charges if your consuming applications are reading data from a data stream in a different AWS region. You will be billed at standard AWS Data Transfer Charges.
* Please note that Amazon Kinesis Data Streams is NOT currently available in AWS Free Tier. AWS Free Tier is a program that offers a free trial for a group of AWS services. For more details about AWS Free Tier, see AWS Free Tier.
Service Level Agreement
Learn about the Amazon Kinesis Data Streams Service Level Agreement by visiting our FAQs.
Discover more Amazon Kinesis Data Streams resources