Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
AWS Lambda function (HTTP) - Both Amazon API Gateway and AWS ALB
def handler(event, context):
input = extract_input_from_event('ALB', event)
output = my_business_logic(input)
return format_output_for('ALB', output)
def extract_input_from_event(alb_or_apigw, event):
# extract data from input event
def format_output_for(alb_or_apigw, output):
# return a json object
def my_business_logic(data):
# implement business logic here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.