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

Uses affected accounts #8

Closed
wants to merge 2 commits into from

Conversation

O5m4r
Copy link

@O5m4r O5m4r commented Jul 15, 2021

Issue #, if available:

Some parameters that were required by some functions were not being passed

Description of changes:

Passed parameters to functions to successfully send notifications

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@rm-fr
Copy link

rm-fr commented Jul 30, 2021

["errorMessage": "name 'affected_accounts' is not defined"]

I got the above error, but
I was able to fix that error with the source you fixed.
thank you.

However, the following error is additionally occurring.

{
"errorMessage": "get_message_for_email() missing 2 required positional arguments: 'affected_accounts' and 'affected_entities'",
"errorType": "TypeError",
"stackTrace": [
" File \"/var/task/handler.py\", line 837, in main\n describe_events(health_client)\n",
" File \"/var/task/handler.py\", line 687, in describe_events\n update_ddb(event_arn, str_update, status_code, event_details, affected_accounts, affected_entities)\n",
" File \"/var/task/handler.py\", line 491, in update_ddb\n send_alert(event_details, affected_accounts, affected_entities, event_type=\"resolve\")\n",
" File \"/var/task/handler.py\", line 97, in send_alert\n send_email(event_details, event_type)\n",
" File \"/var/task/handler.py\", line 234, in send_email\n BODY_HTML = get_message_for_email(event_details, eventType)\n"
]
}

@jonjohnston
Copy link

I think they implemented your fix
@rm-fr I opened issue for the email error but you can fix it yourself by changing in the handler.py def send_email function to include affected_accounts, affected_entities

def send_email(event_details, event_type, affected_accounts, affected_entities):

@jordanaroth
Copy link
Contributor

This should be fixed now

@jordanaroth jordanaroth closed this Sep 3, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants