-
Notifications
You must be signed in to change notification settings - Fork 18
Description
There doesn't seem to be a lambda blueprint named: microsoft-http-endpoint. Tried creating using the blank function, but still not working. When I import my lambda.zip, this is what the code looks like below. When I look at the cloudwatch logs, it doesn't appear that the pager duty test is even hitting the API created by the lamda function: https://xs3clsn0rb.execute-api.us-east-1.amazonaws.com/prod/
Any suggestions? Sorry, I'm not a developer and am researching options for our operations teams.
Thanks,
from Ticket import Ticket
from PagerDuty import PagerDuty
def lambda_handler(event, context):
main(event, is_lambda=True)
def main(event, is_lambda=True):
messages = event['messages']
for message in messages:
try:
message_data = message['data']
if PagerDuty.is_triggered_alert(message_data) and not Ticket.exists(message_data):
ticket = Ticket(message_data, is_lambda)
ticket.create()
# TODO update_pager_duty_with_ticket_info()
except Exception as e:
print 'Error: {0}'.format(e)
if name == 'main':
event = argv[1]
main(event, is_lambda=False)