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, Kinesis Streams returns immediately and sets the status of the stream to UPDATING . After the update is complete, Kinesis Streams 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, Kinesis Streams performs splits or merges on 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 the following limits, which are per region per account unless otherwise noted. You cannot:

  • Scale more than twice per rolling 24 hour period
  • Scale up to double your current shard count
  • Scale down below half your current shard count
  • Scale up to more 500 shards in a stream
  • Scale a stream with more than 500 shards down unless the result is less than 500 shards
  • Scale up more the shard limits for your account

For the default limits for an AWS account, see Streams Limits in the Amazon Kinesis Streams Developer Guide . 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.