When it comes to provisioning, think of GSI just like regular tables. They have read and write capacity and can be scaled up and down just like tables. But it does not happen automatically when you change the provisioning of the table. However, Dynamic DynamoDB does now support automatic provisioning of GSIs.
Upgrade to the latest Dynamic DynamoDB using
pip install -U dynamic-dynamodb
GSI configuration works just as tables. You simply add a new section in your Dynamic DynamoDB configuration. Let’s say that you have a table configuration like this:
To add a configuration for a GSI named
myGSI in the
blogPosts table, add a section like this:
[gsi: ^myGSI$ table: ^blogPosts$]
Thanks to the AWS DynamoDB team for early access, testing and feedback during this release.