Open connorhsm opened 1 year ago
Can confirm this is an issue and also indenting it properly is the solution. As the code is, when adding RDS alarms to the default set, only the last alarm gets created since the create alarm function is outside the for loop so it does not properly iterate through all alarms in the default alarm dictionary
It appears there's a small indentation error that mistakenly left some items outside the for loop, causing only the last alarm configured in the RDS default alarms to be created. https://github.com/aws-samples/amazon-cloudwatch-auto-alarms/blob/118789b31d24a6943c7f6892327503840f351004/src/actions.py#L135-L157
If you compare to the earlier Lambda implementation: https://github.com/aws-samples/amazon-cloudwatch-auto-alarms/blob/118789b31d24a6943c7f6892327503840f351004/src/actions.py#L181-L213
Greatly appreciate this sample, thanks for your work here!