-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(dynamo-db): Error when adding a new GSI with auto-scaling to an existing DynamoDB table with more than one replica regions via CDK #23217
Comments
Given the last two comments on the linked issue both comment on how this is a service issue rather than a CDK issue, I'm inclined to believe this is still the case. Additionally, as seen in that issue, the same CDK code succeeding or failing depending on the current state of the stack (i.e. update or create) very much seems to indicate this is a service team bug. Templates are declarative and shouldn't rely on previous state - making this a Cfn bug.
Can you expand upon this with a full example please? |
Please find the attached examples.zip:
As I checked Table, it uses CfnTable, and there is a custom resource which is used for adding a replica region. Hope these examples clarify. If there is any other questions, please let me know. |
Yes, this does clear things up. Thanks for the elaboration 🙂 Since you're making use of the Given this, I will keep this issue open for tracking and so that people can know there's a workaround with |
This is not a |
This issue was for the existing Instead, the Be aware that there are additional deployment steps involved in a migration from Here are some other resources to get you started (using
|
Describe the bug
Creating this new issue to continue the discussion in this closed issue.
Thank you for the detailed investigation done earlier in this comment.
I respectfully disagree with this comment because I was able to add a new GSI with auto-scaling settings to an existing DynamoDB table with one or more replica regions using "AWS::DynamoDB::GlobalTable" or CfnGlobalTable. I think the current behavior by Table is a bug.
Expected Behavior
Step 1- Create a new DynamoDB table with one or more replica regions, provisioned capacity mode, and auto-scaling enabled
Step 2- Update the existing DynamoDB table with a new GSI which has its own auto-scaling settings should not fail
Current Behavior
Scenario 1 - success
Step 1: Create a table with one or more replica regions, and also a GSI with its own auto-scaling settings
Scenario 2 - success
Step 1: Create a table with only one replica region
Step 2: Update the existing table by adding a GSI with its own auto-scaling settings
Scenario 3 - success
Step 1: Create a table with only one replica region
Step 2: Update the existing table by adding a GSI with its own auto-scaling settings
Step 3: Update the table by adding another replica region
Scenario 4 - fail
Step 1: Create a table with only one replica region
Step 2: Update the existing table by adding a GSI with its own auto-scaling settings
Step 3: Update the table by adding another replica region
Step 4: Update the existing table by adding the second GSI with its own auto-scaling settings to this existing table with two replica regions
Error message:
table/<table_name>/index/<new_index_name>|dynamodb:index:WriteCapacityUnits|dynamodb already exists
Scenario 5 - success
Step 1: Create a table with more than one replica regions
Step 2: Update the existing table by adding a GSI without its own auto-scaling settings (inherits the auto-scaling settings of the table)
Scenario 6 - fail
Step 1: Create a table with more than one replica regions
Step 2: Update the existing table by adding a GSI without its own auto-scaling settings (inherits the auto-scaling settings of the table)
Step 3: Update the existing GSI with its own auto-scaling settings
Error message:
table/<table_name>/index/<new_index_name>|dynamodb:index:WriteCapacityUnits|dynamodb already exists
Reproduction Steps
Step 1- Create a new DynamoDB table with two replica regions, provisioned capacity mode, and auto-scaling enabled using the code below
Step 2- Update the existing DynamoDB table with a new GSI which has its own auto-scaling settings by removing the commented code for step 2
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.53.0
Framework Version
No response
Node.js Version
v19.0.1
OS
macOS
Language
Java
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: