(aws-ddb): replicated tables can't have GSI's added to them. #26916
Labels
@aws-cdk/aws-autoscaling
Related to Amazon EC2 Auto Scaling
@aws-cdk/aws-dynamodb
Related to Amazon DynamoDB
bug
This issue is a bug.
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
When trying to add a GSI to a table that already exists, an error occurs.
Let's say I have defined a custom construct:
And used this construct like so:
This will build and deploy as expected, with the table created, replicated to us-west-2, and set with autoscaling on the table and the GSI.
However, if a second index is added:
This will error out with the following message from CFN:
There doesn't appear to be any combination of settings that will allow for the creation of indexes and the addition of them after the fact with the same code.
Expected Behavior
I would expect the second index to be added to the table without errors.
Current Behavior
An error occurs:
Reproduction Steps
Deploy this app:
Then update to add a second index:
Possible Solution
🤷🏻
Additional Information/Context
No response
CDK CLI Version
2.93.0
Framework Version
2.93.0
Node.js Version
v18.17.0
OS
MacOS 13.4.1
Language
Typescript
Language Version
5.2.2
Other information
No response
The text was updated successfully, but these errors were encountered: