> ## Documentation Index
> Fetch the complete documentation index at: https://help.nops.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Switch Steady Kinesis Streams to Provisioned Mode

> Switch Kinesis data streams with steady traffic from on-demand to provisioned capacity mode.

Kinesis Data Streams in on-demand mode bill per hour of the stream and per GB written and read. In provisioned mode you pay for shards and PUT payload units instead, which costs less when traffic is steady. nOps finds on-demand streams that run all month, sizes the shards they would need with headroom, and estimates the saving.

| | |
| - | - |
| **Cloud** | AWS |
| **Category** | Analytics |
| **Service** | Amazon Kinesis Data Streams |
| **Action** | Modify |
| **Effort** | Low |
| **Restart needed** | No |
| **Can be rolled back** | Yes |
| **Analysis window** | Last 30 days |
| **Source** | nOps |

## Why it matters

On-demand mode is convenient for new or spiky streams, but streams with steady traffic often stay on it long after their traffic pattern is known.

## How nOps finds it

nOps reads the last 30 complete days of Kinesis billing. A stream is flagged when it was billed in at least 90% of the 720 hours and has at least 30 days of history. The shard count covers twice the busiest hour's average ingest rate (or 1.5 times its read rate). Provisioned cost is those shards plus PUT payload units at list price, adjusted to the rate you are billed today. The saving is the last 7 days of on-demand cost, scaled to a month, minus that provisioned cost. Streams created by RDS Database Activity Streams and savings under \$25 a month are left out.

## Before you start

Permission to change the stream mode (`kinesis:UpdateStreamMode`) and a CloudWatch alarm on throttling.

## How to implement

1. Note the shard count shown in the recommendation and check the stream's recent peak in CloudWatch (`IncomingBytes`, `IncomingRecords`).
2. In the Kinesis console, open the stream and choose **Configuration → Edit capacity mode → Provisioned**, or run `aws kinesis update-stream-mode --stream-arn ARN --stream-mode-details StreamMode=PROVISIONED`.
3. Set the shard count with `aws kinesis update-shard-count` if it differs from what Kinesis picks.
4. Add CloudWatch alarms on `WriteProvisionedThroughputExceeded` and `ReadProvisionedThroughputExceeded`, or set up shard scaling.
5. Update the stream mode in Terraform or CloudFormation.

## Risks and considerations

* A provisioned stream throttles writes above its shard capacity, so a traffic spike larger than the headroom can fail or slow producers.
* The capacity mode can be switched only a limited number of times a day.
* To roll back, switch the stream back to on-demand mode.

## FAQs

> [accordion] How does nOps pick the number of shards?
>
> It takes the busiest hour of the last 30 days and allows twice that ingest rate (or 1.5 times the read rate), whichever needs more shards.

## Related

* [Switch Steady DynamoDB Tables to Provisioned Capacity](https://help.nops.io/inform/supported-recommendations/switch-steady-dynamodb-tables-to-provisioned-capacity)
* [Switch Steady Aurora Serverless to Provisioned](https://help.nops.io/inform/supported-recommendations/switch-steady-aurora-serverless-to-provisioned)
* [Supported recommendations](https://help.nops.io/inform/supported-recommendations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.