Last active
July 14, 2020 18:17
-
-
Save alexdlaird/085abd0733f7b93efa51edacab3adf75 to your computer and use it in GitHub Desktop.
AWS Lambda Flask integration example for pyngrok, full documentation found at https://pyngrok.readthedocs.io/en/latest/integrations.html
This file contains 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
import json | |
from flask import Blueprint, request | |
from lambdas.foo_GET import lambda_function as foo_GET | |
bp = Blueprint("lambda_routes", __name__) | |
@bp.route("/foo") | |
def route_foo(): | |
# This becomes the event in the Lambda handler | |
event = { | |
"someQueryParam": request.args.get("someQueryParam") | |
} | |
return json.dumps(foo_GET.lambda_handler(event, {})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment