Cannot perform more than one GSI creation or deletion in a single update
Error Message
Cannot perform more than one GSI creation or deletion in a single update.
Problem
This error occurs when you try to:
- create a DynamoDB table with more than one Global Secondary Index (GSI); or
- add or remove more than one GSI for an existing table
This implies that you can only perform one GSI creation/deletion for a given table per serverless deploy
.
Solution
A work around would be to break up your changes to only perform one GSI update at a time.
For example, if you need to add a GSI and also remove one in a table, try the following:
- Add the first GSI and run
serverless deploy
- Wait for the GSI to be created and for it to show an
Active
status - Remove the second GSI and run
serverless deploy
again
Note that, the second step can take longer for existing tables with large number of rows, as DynamoDB backfills the index.
Help improve this page. Edit it with GitHub
Was this page helpful? Let us know via Twitter
Do your Serverless deployments take too long? Incremental deploys in Seed can speed it up 100x!
Learn More