AWSAmazon Kinesis Data StreamsMessaging

aws_kinesis_stream cost estimation

A real-time data stream. Two capacity modes: Provisioned (priced per shard-hour) or On-Demand (priced per record and per GB).

An aws_kinesis_stream is a managed stream for real-time data ingest and processing. Pricing depends on capacity mode, which is set by the stream_mode_details block.

Provisioned mode (the default) bills per shard-hour. Each shard handles 1 MB/s write and 2 MB/s read with up to 1,000 records/second. A stream with shard_count = 5 costs 5 × $0.015/hour × 730 = $54.75/month just for shard hours, regardless of actual throughput.

On-Demand mode bills per record and per GB ingested/retrieved: - $0.40 per million records written (PUT payload units, 25 KB each) - $0.04 per GB ingested - $0.04 per GB retrieved by consumers

On-Demand is right for variable workloads or when you don't want to manage shard count. Provisioned is cheaper for predictable steady-state load.

Additional cost components:

Extended retention (24h default, up to 365 days): each extra hour is $0.02/shard-hour. For 7-day retention on a 5-shard stream, that's an extra ~$130/month.

Enhanced fan-out consumers: $0.015/consumer-shard-hour plus $0.013/GB retrieved. Right when you have multiple consumers each needing dedicated throughput.

Data transfer between AZs: free for Kinesis-internal traffic but consumers pulling data pay standard egress.

c3x reads stream_mode_details and shard_count for provisioned mode. On-Demand requires expected throughput in c3x-usage.yml.

Terraform example

A minimal but realistic configuration that C3X can estimate.

resource "aws_kinesis_stream" "events" {
  name             = "production-events"
  shard_count      = 5
  retention_period = 48

  stream_mode_details {
    stream_mode = "PROVISIONED"
  }

  shard_level_metrics = [
    "IncomingBytes",
    "OutgoingBytes",
  ]

  tags = {
    Environment = "production"
  }
}

Pricing dimensions

What you actually pay for when you provision aws_kinesis_stream.

DimensionUnitWhat's being charged
Provisioned shard hoursper shard-hourEach shard handles 1 MB/s write and 2 MB/s read. Billed continuously regardless of utilization.
$0.015/shard-hour ≈ $10.95/shard/month
PUT payload units (On-Demand)per 1M payload unitsEach 25 KB written counts as one payload unit. A 100 KB write is 4 payload units.
$0.40/1M payload units
On-Demand data ingestper GBBytes written to the stream.
$0.04/GB
On-Demand data retrievalper GBBytes read by consumers. Charged per consumer per GB retrieved.
$0.04/GB
Extended retentionper shard-hourBeyond 24-hour default. Configured via retention_period.
$0.02/shard-hour extra
Enhanced fan-outper consumer-shard-hour + per GBDedicated 2 MB/s read per consumer per shard.

Optimization tips

Common ways to reduce aws_kinesis_stream cost without changing the workload.

Use On-Demand for unpredictable workloads

Workload-dependent

Provisioned bills regardless of utilization. On-Demand bills only for actual data. For workloads with low average utilization or unpredictable spikes, On-Demand is cheaper despite per-record fees.

Right-size shard count in Provisioned mode

$11/month per removed shard

Each shard is $11/month. Many streams are overprovisioned for 'safety'. Check CloudWatch IncomingBytes and WriteProvisionedThroughputExceeded to find the actual utilization.

Skip Enhanced Fan-Out unless needed

Workload-dependent

EFO is per-consumer per-shard. For workloads with one or two consumers, regular GetRecords sharing the 2 MB/s read budget is cheaper. EFO is right for 3+ concurrent consumers.

Avoid extended retention you don't use

Up to ~75% on shard cost

Default retention is 24 hours. Extending to 7 days more than doubles the shard cost. If consumers process within an hour, 24 hours is plenty.

Consider Kafka (MSK) for very high throughput

Extreme-volume workloads

At extreme throughput (>10 TB/day sustained), MSK or self-managed Kafka can be cheaper than Kinesis. Crossover involves comparing shard count, MSK cluster size, and operational overhead.

FAQ

Provisioned or On-Demand mode?

Provisioned: predictable load, want lowest cost per GB at sustained throughput. On-Demand: variable load, prefer simplicity, accept ~30% premium per GB for not managing shards. Streams often start on-demand then move to provisioned once traffic stabilizes.

How does c3x estimate Kinesis cost?

For Provisioned: c3x multiplies shard_count by the per-shard rate plus extended retention if configured. For On-Demand: requires monthly_incoming_records, monthly_data_gb in c3x-usage.yml.

Are consumer applications counted?

Standard Lambda consumers via event source mapping: each Lambda invocation is billed as a separate Lambda cost. Enhanced fan-out consumers add per-shard-hour cost. KCL-based applications on EC2 add EC2 cost.

What about Kinesis Data Firehose?

Firehose is a separate resource (aws_kinesis_firehose_delivery_stream) priced per GB ingested with no shards to manage. Right for batch-style delivery to S3/Redshift/OpenSearch. c3x estimates Firehose independently.

Related resources

Estimate this resource in your own Terraform

Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_kinesis_stream.