I was having trouble with updating a Global Secondary Index (GSI) in AWS DynamoDB. But I got this gist from @toastdriven to kick me in the right direction. Here’s how you do it with the boto.dynamodb2
library.
First off, make sure that you have the latest boto
(at least 2.20.1
) release, as it has support for DynamoDB GSI.
pip install -U boto
My table looks like this when described:
You can see that the table is called MailPostsExperimet
and my only GSI is called gsiPosts
. The GSI has a read/write provisioning of 1/1 initially. To increase the provisioning run:
That’s it!