aws / aws-lambda-go

Libraries, samples and tools to help Go developers develop AWS Lambda functions.
Apache License 2.0
3.58k stars 548 forks source link

Method with signature events.APIGatewayProxyRequest and events.APIGatewayProxyResponse doesn't invoke Http API #517

Open mihirpmehta opened 10 months ago

mihirpmehta commented 10 months ago

I am using Authorizer lambda function in API gateway with following signature

func handleRequest(ctx context.Context, request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {

Lambda function does return 200 but still API gateway throws 500 with {"Message":null} Response

If i change handler signature to

func handler(request events.APIGatewayV2CustomAuthorizerV1Request) (events.APIGatewayV2CustomAuthorizerIAMPolicyResponse, error) {

Same code works as expected and my endpoint get invoked by API gateway