UpdateShardCount
Written by
Updated at August 15, 2025
Updates the number of shards in the specified stream. Only shard count increases are allowed.
On success, this method sets the stream status to UPDATING and returns an HTTP 200 response with JSON data. After successful update, the stream transitions to the ACTIVE status. The scaling time depends on the stream size and may take several minutes. You can continue reading data from and writing data to the stream while it is in the UPDATING status.
Request
The request contains JSON-formatted data.
{
"ScalingType": "string",
"StreamName": "string",
"TargetShardCount": number
}
Request options
| Option | Description |
|---|---|
ScalingType |
Scaling type. UNIFORM_SCALING creates shards of equal size.Type: String Allowed values: UNIFORM_SCALINGRequired: Yes |
StreamName |
Data stream name. Type: String Size: 1-128 characters.The possible values are: [a-zA-Z][a-zA-Z0-9-]+*(?<!-)$Required: Yes |
TargetShardCount |
Target number of shards. Type: Integer Minimum value: 1Required: Yes |
Response
Successful requests return HTTP 200 with a JSON-formatted response body.
{
"CurrentShardCount": number,
"StreamName": "string",
"TargetShardCount": number
}
Response parameters
| Option | Description |
|---|---|
CurrentShardCount |
Current number of shards. Type: Integer Minimum value: 1Required: Yes |
StreamName |
Data stream name. Type: String Size: 1-128 characters.The possible values are: [a-zA-Z][a-zA-Z0-9-]+*(?<!-)$Required: Yes |
TargetShardCount |
Target number of shards. Type: Integer Minimum value: 1Required: Yes |
Errors
| Error | Description | HTTP code |
|---|---|---|
InvalidArgumentException |
The argument is invalid. See the error message for details. | 400 |
LimitExceededException |
The request limit is exceeded. | 400 |
ResourceInUseException |
The resource is currently locked by another operation. | 400 |
ResourceNotFoundException |
The requested resource was not found. | 400 |
Errors common to all methods may occur.