sbstjn / serverless-dynamodb-autoscaling

Serverless Plugin for Amazon DynamoDB Auto Scaling configuration.

Home Page:https://sbstjn.com/serverless-dynamodb-auto-scaling-with-cloudformation.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dynamodb already exists

eladhaz05 opened this issue · comments

I have a bug when i deploy i got this error:
...:WriteCapacityUnits|dynamodb already exists

I do not understand why i got it.
Thank for the help

This isn't a problem with the plugin. The issue is a case of having orphaned configurations in AWS. Not all resources show up in the console (ec2 instance roles are only viewable via the cli). If you run the following commands, you should see the orphaned configs:
aws application-autoscaling describe-scalable-targets --service-namespace dynamodb --region 'your-region'
aws application-autoscaling describe-scaling-policies --service-namespace dynamodb --region 'your-region'

You should be able to use this command to remove them:
aws application-autoscaling deregister-scalable-target --service-namespace dynamodb --resource-id 'your-resource-id' --scalable-dimension 'your-scalable-dimension' --region 'your-region'

One thing to note - I ended up with this issue because my deployment user lacked many application-autoscaling permissions

This comment helped me. I am not using dynamodb, but Aurora rds and got the same issue in my CDK app. Using these commands I was able to remove/de-register the policies and all good. Thanks!