Reputation: 151
I'm trying to update my table's "read" throughput and keep "write" throughput the same. The API requires you to set both the "read" and "write" values in the request but when one is left the same it throws an exception:
Message: Error executing "UpdateTable" on "https://dynamodb.us-east-1.amazonaws.com"; AWS HTTP error: Client error:
POST https://dynamodb.us-east-1.amazonaws.com
resulted in a400 Bad Request
response: {"__type":"com.amazon.coral.validate#ValidationException","message":"The provisioned throughput for the index regionCode (truncated...) ValidationException (client): The provisioned throughput for the index regionCode-index will not change. The requested value equals the current value. Current ReadCapacityUnits provisioned for index regionCode-index: 10. Requested ReadCapacityUnits: 10. Current WriteCapacityUnits provisioned for index regionCode-index: 2. Requested WriteCapacityUnits: 2. Refer to the Amazon DynamoDB Developer Guide for current limits and how to request higher limits. - {"__type":"com.amazon.coral.validate#ValidationException","message":" The provisioned throughput for the index regionCode-index will not change. The requested value equals the current value. Current ReadCapacityUnits provisioned for index regionCode-index: 10. Requested ReadCapacityUnits: 10. Current WriteCapacityUnits provisioned for index regionCode-index: 2. Requested WriteCapacityUnits: 2. Refer to the Amazon DynamoDB Developer Guide for current limits and how to request higher limits."}`
Here's the request:
$result = $client->updateTable([
'ProvisionedThroughput' => [
'ReadCapacityUnits' => (int) $readCapacity, // REQUIRED
'WriteCapacityUnits' => (int) $writeCapacity, // REQUIRED
],
'TableName' => $table, // REQUIRED
]);
How do you update only 1 provisioned throughput capacity & leave the other the same?
Upvotes: 1
Views: 1548
Reputation: 8830
Looks like that your table is provisioned to 2 - WCU
and 10 - RCU
, and you are trying to call updateTable
with the same values as the currently set.
Upvotes: 2