Open tff610 opened 1 year ago
Please note: the activate funtion is from: https://github.com/aws-samples/amazon-cloudwatch-auto-alarms - See Activate: You can also manually invoke the CloudWatchAutoAlarms lambda function with the following event payload to create / update EC2 alarms without having to stop and start your EC2 instances:
{ "action": "scan" }
after the Merge pull request #32 from aws-samples/add_evaluation_periods - the activate function is broken see error: Response { "errorMessage": "scan_and_process_alarm_tags() missing 1 required positional argument: 'evaluation_periods'", "errorType": "TypeError", "stackTrace": [ " File \"/var/task/cw_auto_alarms.py\", line 181, in lambda_handler\n scan_and_process_alarm_tags(create_alarm_tag, default_alarms, metric_dimensions_map, sns_topic_arn,\n" ] }
Function Logs START RequestId: 6bb18acb-abee-440d-9738-6cee3f656c87 Version: $LATEST [INFO] 2023-03-26T10:06:15.966Z 6bb18acb-abee-440d-9738-6cee3f656c87 event received: {'action': 'scan'} [ERROR] 2023-03-26T10:06:15.966Z 6bb18acb-abee-440d-9738-6cee3f656c87 Failure creating alarm: scan_and_process_alarm_tags() missing 1 required positional argument: 'evaluation_periods' [ERROR] TypeError: scan_and_process_alarm_tags() missing 1 required positional argument: 'evaluation_periods' Traceback (most recent call last): File "/var/task/cw_auto_alarms.py", line 181, in lambda_handler scan_and_process_alarm_tags(create_alarm_tag, default_alarms, metric_dimensions_map, sns_topic_arn,END RequestId: 6bb18acb-abee-440d-9738-6cee3f656c87 REPORT RequestId: 6bb18acb-abee-440d-9738-6cee3f656c87 Duration: 16.05 ms Billed Duration: 17 ms Memory Size: 128 MB Max Memory Used: 52 MB Init Duration: 271.69 ms
Request ID 6bb18acb-abee-440d-9738-6cee3f656c87