[Update] You can now change the capacity mode of Amazon DynamoDB tables from provisioned to on-demand up to 4 times within 24 hours
Hello, this is Wakatsuki from the Manufacturing Business Technology Department.
Amazon DynamoDB has been updated to allow changing the table capacity mode from provisioned (PROVISIONED) to on-demand (PAY_PER_REQUEST) up to 4 times within 24 hours.
DynamoDB documentation has been updated accordingly. (Note that at the time of writing, this is not yet reflected in the Japanese version)
You can switch tables from provisioned capacity mode to on-demand mode up to four times in a 24-hour rolling window. You can switch tables from on-demand mode to provisioned capacity mode at any time.
Before this update, when switching from on-demand mode to provisioned mode, you had to wait 24 hours after table creation or the last switch to on-demand mode before you could switch back. This limitation was a significant constraint when you wanted to change the DynamoDB table capacity mode several times a day, for example, for maintenance or load testing purposes.
With this update, the restrictions on frequent changes to table capacity mode have been greatly relaxed.
I tried it out
I tested whether it's actually possible to switch a table's capacity mode from provisioned to on-demand up to 4 times in a day.
Table Creation (for testing)
First, I created a test table in provisioned mode.
# Create table with provisioned mode
TABLE_NAME=test-capacity-mode
aws dynamodb create-table \
--table-name ${TABLE_NAME} \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--billing-mode PROVISIONED \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
Switching from Provisioned Mode to On-Demand Mode
Next, I switched the table's capacity mode from provisioned mode to on-demand mode.
aws dynamodb update-table \
--table-name ${TABLE_NAME} \
--billing-mode PAY_PER_REQUEST
Switching from On-Demand Mode to Provisioned Mode
Then, I switched the table's capacity mode from on-demand mode back to provisioned mode.
aws dynamodb update-table \
--table-name ${TABLE_NAME} \
--billing-mode PROVISIONED \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
```### Switching to On-Demand Mode 4 Times
Let's repeat the aforementioned command and try switching from provisioned to on-demand mode 4 times.
On the 5th attempt, we got the following error:
```shell
$ aws dynamodb update-table \
--table-name ${TABLE_NAME} \
--billing-mode PAY_PER_REQUEST
An error occurred (LimitExceededException) when calling the UpdateTable operation (reached max retries: 2): Subscriber limit exceeded: Update to PayPerRequest mode are limited to 4 in 1 day(s). Last update at Thu Aug 14 15:14:26 UTC 2025. Next update can be made at Fri Aug 15 14:45:07 UTC 2025
According to the message, we've already reached the daily limit of 4 changes to on-demand mode, so the next change can't be made until approximately 23 hours and 30 minutes later. This confirms that the 4 times per 24 hours limit is indeed functioning.
Additional Information
Capacity Mode Changes Can Take Time
When changing a table's capacity mode, the table may remain in the UPDATING
state for an extended period. During this state, you need to wait for the capacity mode change to complete.
If you try to change the capacity mode of a table in the UPDATING
state, you'll get an error like this:
$ aws dynamodb update-table \
--table-name ${TABLE_NAME} \
--billing-mode PROVISIONED \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
An error occurred (ResourceInUseException) when calling the UpdateTable operation: Attempt to change a resource which is still in use: Table IOPS are currently being updated. Table: test-capacity-mode
Make sure to check that the table status is ACTIVE
before attempting to make a switch.
$ aws dynamodb describe-table \
--table-name ${TABLE_NAME} \
--query '[Table.BillingModeSummary.BillingMode,Table.TableStatus]' \
--output text
PAY_PER_REQUEST UPDATING
Incidentally, from what I tested, the first switch from on-demand mode to provisioned mode took about 10 minutes in the UPDATING
state, but subsequent switches completed in just a few seconds.
Conclusion
I wanted to share an update for Amazon DynamoDB that now allows changing a table's capacity mode from provisioned (PROVISIONED) to on-demand (PAY_PER_REQUEST) up to 4 times within a 24-hour period.
That's all