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

after the Merge pull request #32 from aws-samples/add_evaluation_periods - the activate function is broken #33

Open
tff610 opened this issue Mar 26, 2023 · 1 comment

Comments

@tff610
Copy link

tff610 commented Mar 26, 2023

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

@tff610
Copy link
Author

tff610 commented Mar 26, 2023

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"
}

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

No branches or pull requests

1 participant