Description
2. Scope of request
Cloudformation cannot perform more than one DynamoDB GSI creation or deletion in a single update. Instead, users must add/delete a single GSI per update, and then manually create a new update for each GSI which needs to be added. For teams which have Cloudformation run as part of a deployment pipeline, this is even more bothersome as it necessitates waiting for multiple end-to-end runs of the entire deployment pipeline for each GSI that needs to be created/deleted.
Furthermore, once a Cloudformation stack includes a DynamoDB table with more than one GSI, it is no longer possible for someone to re-use this stack without manually editing it and going though the one-at-a-time GSI update process. This issue seems to be in direct contrast with the advertised goals of CloudFormation.
https://aws.amazon.com/cloudformation/
AWS CloudFormation provisions your resources in a safe, repeatable manner, allowing you to build and rebuild your infrastructure and applications, without having to perform manual actions or write custom scripts.
3. Expected behavior
- Update operations to existing DynamoDb tables succeed even when adding/deleting multiple GSIs
- Creating a new DynamoDb table using an Cloudformation stack that includes multiple GSIs succeeds
4. Suggest specific test cases
- Creating a new DynamoDb table with two GSIs is able to complete successfully
- Adding two GSIs in a single update to an existing table is able to complete successfully
- Deleting a DynamoDb table with two GSIs is able to complete successfully
- Removing two GSIs in a single update to an existing table is able to complete successfully
5. Helpful Links to speed up research and evaluation
https://stackoverflow.com/questions/28402003/creating-multiple-gsis-by-updatetable-dynamodb
https://stackoverflow.com/questions/47920665/how-to-delete-more-than-one-global-secondary-index-from-the-cloudformation-at-on
Managing Global Secondary Indexes documentation
6. Category
DB: DynamoDb
Metadata
Metadata
Assignees
Type
Projects
Status