Raxvis/lambdify

Handle ALB Events

Closed this issue · 2 comments

Handle ALB Events

{
    "body": "base64_encoded_string",
    "headers": {
        "accept-encoding": "gzip, deflate",
        "cache-control": "no-cache",
        "content-length": "242",
        "host": "host.example.com",
        "x-amzn-trace-id": "Root=1-5dbafc0f-a4ac9c9046b152c44e90ca34",
        "x-forwarded-for": "ip_address",
        "x-forwarded-port": "443",
        "x-forwarded-proto": "https"
    },
    "httpMethod": "GET",
    "isBase64Encoded": true,
    "path": "/",
    "queryStringParameters": {},
    "requestContext": {
        "elb": {
            "targetGroupArn": "arn:aws:elasticloadbalancing:*"
        }
    }
}

getMethod() and getBody() need to be updated

getMethod() should check multiple places
getBody() will need to check isBase64Encoded and handle that appropriately

This has been added already