Skip to content
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

CloudWatchAlarm are not removed when composite alarm(s) depend on it #462

Open
fridim opened this issue Dec 13, 2024 · 0 comments
Open

CloudWatchAlarm are not removed when composite alarm(s) depend on it #462

fridim opened this issue Dec 13, 2024 · 0 comments

Comments

@fridim
Copy link

fridim commented Dec 13, 2024

Please consider the following output of aws-nuke v3.35.2 run:

ca-central-1 - CloudWatchAlarm - alarm2-scaleup-t3aSmall - [Name: "alarm2-scaleup-t3aSmall"] - failed
time="2024-12-13T14:25:11Z" level=error msg="ValidationError: Cannot delete alarm2-scaleup-t3aSmall as there are composite alarm(s) depending on it.\n\tstatus code: 400, request id: 748a5569-1193-403b-83c9-584ce227cdc7"
ca-central-1 - CloudWatchAlarm - alphaGamma-CPU-utilization-Low - [Name: "alphaGamma-CPU-utilization-Low"] - failed
time="2024-12-13T14:25:11Z" level=error msg="ValidationError: Cannot delete alphaGamma-CPU-utilization-Low as there are composite alarm(s) depending on it.\n\tstatus code: 400, request id: 2f8c0972-d10d-4e80-87eb-4c98487137ff"
ca-central-1 - CloudWatchAlarm - awsec2-i-02f28694a3bb417b5-GreaterThanOrEqualToThreshold-CPUUtilization - [Name: "awsec2-i-02f28694a3bb417b5-GreaterThanOrEqualToThreshold-CPUUtilization"] - failed
time="2024-12-13T14:25:11Z" level=error msg="ValidationError: Cannot delete awsec2-i-02f28694a3bb417b5-GreaterThanOrEqualToThreshold-CPUUtilization as there are composite alarm(s) depending on it.\n\tstatus code: 400, request id: 26cfe271-a350-4628-b356-0dd5dbafeced"
ca-central-1 - CloudWatchAlarm - t3a.xlarge-CPU-Low - [Name: "t3a.xlarge-CPU-Low"] - failed
time="2024-12-13T14:25:11Z" level=error msg="ValidationError: Cannot delete t3a.xlarge-CPU-Low as there are composite alarm(s) depending on it.\n\tstatus code: 400, request id: d65f85d8-3c16-43dd-b235-655be52642b6"
time="2024-12-13T14:25:11Z" level=fatal msg=failed

To reproduce the issue, create a composite alarm in CloudWatch Alarm section, using the above alarms. That should be enough to prevent the deletion.

As shown in the following screenshot

2024-12-13_15-37

expected behavior

aws-nuke should remove the composite alarms?

Resolution

When deleting the composite alarms manually, aws-nuke is able to delete the alarms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants