Skip to content

AWS::DynamoDB::Table GlobalSecondaryIndex Support for Multiple GSIs #229

Open
@thesilentg

Description

@thesilentg

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

  1. Update operations to existing DynamoDb tables succeed even when adding/deleting multiple GSIs
  2. Creating a new DynamoDb table using an Cloudformation stack that includes multiple GSIs succeeds

4. Suggest specific test cases

  1. Creating a new DynamoDb table with two GSIs is able to complete successfully
  2. Adding two GSIs in a single update to an existing table is able to complete successfully
  3. Deleting a DynamoDb table with two GSIs is able to complete successfully
  4. 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

No one assigned

    Labels

    databaseRDS, DynamoDB, ElastiCache, Neptune, Amazon Redshift, Amazon QLDB, Amazon DocumentDB

    Type

    No type

    Projects

    Status

    Researching

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions