DynamoDB GSI Autoscaling doesn't require a scaling policy, leading to invalid infrastructure configuration #7464
Labels
@aws-cdk/aws-dynamodb
Related to Amazon DynamoDB
bug
This issue is a bug.
ddb-legacy-table
This issue has to do with DynamoDB's legacy Table construct. Close after migration guide is out.
effort/medium
Medium work item – several days of effort
p2
DynamoDB GSI Autoscaling doesn't require a scaling policy, leading to invalid infrastructure configuration
Background
When using GSI Autoscaling, it's possible to add autoscaling targets without adding an associated scaling policy.
When you do that, CDK (nor the underlying CloudFormation) error on the invalid configuration.
What's the impact
The end result is that DynamoDB results in failing to autoscale the GSI, resulting in the GSI only using the default levels, with the only notification to the customer being an "ERROR" field when looking at the GSI.
Currently, nothing prevents the customer from ending up with an invalid autoscaling configuration, that'll only get caught when they need autoscaling the most.
What should CDK do
In my opinion, CDK should fail the build because of the invalid autoscaling configuration on the GSI.
I imagine it'd be possible to detect whether no scaling policy was added for the GSI (either through the helpers, or manually through lower-level cloudformation resources)
Potential "gotchas" with the implementation
The text was updated successfully, but these errors were encountered: