Public
Authored by Stein van Broekhoven

AWS Lambda + Api gateway test

Edited

Get the external IP where the lambda is running from icanhazip.com and return it to the api gateway.

It also returns the event input that the lambda can use from the request you've send.

The gateway expects a json formatted object: source

{
    statusCode: "...",            // a valid HTTP status code
    headers: { 
        custom-header: "..."      // any API-specific custom header
    },
    body: "...",                  // a JSON string.
    isBase64Encoded:  true|false  // for binary support
}
lambda_function.py 399 Bytes
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment