Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

[ aws . kinesis ]

update-shard-count

Description

Updates the shard count of the specified stream to the specified number of shards.

Updating the shard count is an asynchronous operation. Upon receiving the request, Amazon Kinesis returns immediately and sets the status of the stream to UPDATING . After the update is complete, Amazon Kinesis sets the status of the stream back to ACTIVE . Depending on the size of the stream, the scaling action could take a few minutes to complete. You can continue to read and write data to your stream while its status is UPDATING .

To update the shard count, Amazon Kinesis performs splits and merges and individual shards. This can cause short-lived shards to be created, in addition to the final shards. We recommend that you double or halve the shard count, as this results in the fewest number of splits or merges.

This operation has a rate limit of twice per rolling 24 hour period. You cannot scale above double your current shard count, scale below half your current shard count, or exceed the shard limits for your account.

For the default limits for an AWS account, see Streams Limits in the Amazon Kinesis Streams Developer Guide . If you need to increase a limit, contact AWS Support .

See also: AWS API Documentation

Synopsis

  update-shard-count
--stream-name <value>
--target-shard-count <value>
--scaling-type <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--stream-name (string)

The name of the stream.

--target-shard-count (integer)

The new number of shards.

--scaling-type (string)

The scaling type. Uniform scaling creates shards of equal size.

Possible values:

  • UNIFORM_SCALING

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

Output

StreamName -> (string)

The name of the stream.

CurrentShardCount -> (integer)

The current number of shards.

TargetShardCount -> (integer)

The updated number of shards.