Created
October 21, 2019 13:39
-
-
Save alexcasalboni/aed4bfed62db76db1237e1f5d1ead06c to your computer and use it in GitHub Desktop.
AWS Lambda function (HTTP) - Both Amazon API Gateway and AWS ALB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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