2 years ago

#73958

test-img

George Valentin

AWS API Gateway doesn't pass the HTTP data

Basically, I'm making a serverless API using Lambda. I have this method:

enter image description here

As you can see, this method is using Lambda Proxy, so I would expect that my Lambda function would receive the request data, but somehow, this function:

exports.handler = async (event, ctx) => 
{
    return [event, ctx];
};

Has the response is:

[
    {
        "name": "dada",
        "email": "dada@dada.com",
        "message": "haha"
    },
    {
        "callbackWaitsForEmptyEventLoop": true,
        "functionVersion": "$LATEST",
        "functionName": "******-contact-form",
        "memoryLimitInMB": "128",
        "logGroupName": "/aws/lambda/******-contact-form",
        "logStreamName": "2022/01/20/[$LATEST]d65e9483c8d544c4976d91ff5875b11d",
        "invokedFunctionArn": "arn:aws:lambda:eu-central-1:252365724355:function:******-contact-form",
        "awsRequestId": "681b4362-89a3-426c-a194-06173c3ec4ed"
    }
]

I have other methods (with GET verbose) and using Lambda Proxy I receive all the details from the request. What I'm doing wrong?

amazon-web-services

api

aws-lambda

gateway

0 Answers

Your Answer

Accepted video resources