UpdateStreamWarmThroughput
Updates the warm throughput configuration for the specified Amazon Kinesis Data Streams on-demand data stream. This operation allows you to proactively scale your on-demand data stream to a specified throughput level, enabling better performance for sudden traffic spikes.
Note
When invoking this API, you must use either the StreamARN or the StreamName parameter, or both. It is recommended that you use the StreamARN input parameter when you invoke this API.
Updating the warm throughput is an asynchronous operation. Upon receiving the request, Kinesis Data Streams returns immediately and sets the status of the stream to UPDATING. After the update is complete, Kinesis Data 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.
This operation is only supported for data streams with the on-demand capacity mode in accounts that have MinimumThroughputBillingCommitment enabled. Provisioned capacity mode streams do not support warm throughput configuration.
This operation has the following default limits. By default, you cannot do the following:
-
Scale to more than 10 GiBps for an on-demand stream.
-
This API has a call limit of 5 transactions per second (TPS) for each AWS account. TPS over 5 will initiate the
LimitExceededException.
For the default limits for an AWS account, see Streams Limits in the Amazon Kinesis Data Streams Developer
Guide. To request an increase in the call rate limit, the shard limit for this API, or your overall shard limit, use the limits form
Request Syntax
{
"StreamARN": "string",
"StreamName": "string",
"WarmThroughputMiBps": number
}
Request Parameters
The request accepts the following data in JSON format.
- StreamARN
-
The ARN of the stream to be updated.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern:
arn:aws.*:kinesis:.*:\d{12}:stream/\S+Required: No
- StreamName
-
The name of the stream to be updated.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
[a-zA-Z0-9_.-]+Required: No
- WarmThroughputMiBps
-
The target warm throughput in MB/s that the stream should be scaled to handle. This represents the throughput capacity that will be immediately available for write operations.
Type: Integer
Valid Range: Minimum value of 0.
Required: Yes
Response Syntax
{
"StreamARN": "string",
"StreamName": "string",
"WarmThroughput": {
"CurrentMiBps": number,
"TargetMiBps": number
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- StreamARN
-
The ARN of the stream that was updated.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 2048.
Pattern:
arn:aws.*:kinesis:.*:\d{12}:stream/\S+ - StreamName
-
The name of the stream that was updated.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 128.
Pattern:
[a-zA-Z0-9_.-]+ - WarmThroughput
-
Specifies the updated warm throughput configuration for your data stream.
Type: WarmThroughputObject object
Errors
For information about the errors that are common to all actions, see Common Errors.
- AccessDeniedException
-
Specifies that you do not have the permissions required to perform this operation.
HTTP Status Code: 400
- InvalidArgumentException
-
A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.
- message
-
A message that provides information about the error.
HTTP Status Code: 400
- LimitExceededException
-
The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.
- message
-
A message that provides information about the error.
HTTP Status Code: 400
- ResourceInUseException
-
The resource is not available for this operation. For successful operation, the resource must be in the
ACTIVEstate.- message
-
A message that provides information about the error.
HTTP Status Code: 400
- ResourceNotFoundException
-
The requested resource could not be found. The stream might not be specified correctly.
- message
-
A message that provides information about the error.
HTTP Status Code: 400
- ValidationException
-
Specifies that you tried to invoke this API for a data stream with the on-demand capacity mode. This API is only supported for data streams with the provisioned capacity mode.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: