Skip to content

microsoft-http-endpoint blueprint? #1

@hansonra

Description

@hansonra

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions