Unable to delete AWSServiceRoleForApplicationAutoScaling_DynamoDBTable role

0

Hi,

I can't tell if it is a IAM or a DynamoDB related issue, but I once have a DynamoDB table called "Person" which doesn't exist any more and when I try to delete the AWSServiceRoleForApplicationAutoScaling_DynamoDBTable service role it displays "deletion failed - Service linked role is still in use - Resource ARNs - eu-west-3 - table/Person/index/id-index".
I suppose there is a dangling reference somewhere...

Any advice ?
Thanks!

bl75
asked 5 years ago464 views
3 Answers
0
Accepted Answer

Hi

I see that you are facing errors while deleting service linked role AWSServiceRoleForApplicationAutoScaling_DynamoDBTable.

As we can see in the error "table/Person/index/id-index” is still using the role. You can delete a service-linked role only after first deleting the related scalable resources.

You should deregister the scalable target “table/Person/index/id-index” [1] and also delete the scaling polices[2]

After clearing all the dependencies you can the delete the service-linked role in concern.

Please refer https://docs.aws.amazon.com/autoscaling/plans/userguide/aws-auto-scaling-service-linked-roles.html#delete-service-linked-role for more information.

Update the thread if you continue to face any issues.

[1] https://docs.aws.amazon.com/cli/latest/reference/application-autoscaling/deregister-scalable-target.html
[2] https://docs.aws.amazon.com/cli/latest/reference/application-autoscaling/delete-scaling-policy.html

AWS
answered 5 years ago
0

Yes, that was exactly the point! The autoscaling policy for the index in question was still here despite the table was deleted.

According to the links you provided and using the CLI to delete the corresponding autoscaling resources, I can now get rid of the role.

Thanks

bl75
answered 5 years ago
0

Hello,

We are facing a similar issue, but IAM won't give away the name of the resources still in use. Cloudtrail also does not seem to be helpful in identifying those resources.

This is on the back of tearing down a CDK stack that involved a global DynamoDB table.

Thank you very much in advance!

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions