Lambda not getting triggered for API call

0

On hitting APIs, authorizer lambda is triggered and responds with Success/Allow but main lambda is not triggered to complete the API call. Response of Authorizer:{ Version: '2012-10-17', Statement: [ { Action: 'execute-api:Invoke', Effect: 'Allow', Resource: '<<arn>>/api/POST/audit/postaudit' } ] }

The same code is deployed through Gitlab CI in different branches, some branche APIs are working fine while other branches having above error.

2 Answers
0

Hi

Lets try debugging:

  • Ensure the main Lambda is still integrated with the API method in API Gateway. Test it directly using a sample event. Link refrence
  • Enable the Logging on the API GW to see what happening about the triggering. Enable Logging on API GW
  • Check your GitLab CI pipeline for deployment discrepancies. Check GitLab CI for deployment differences.
  • Review authorizer policy and CORS settings.
profile picture
EXPERT
GK
answered a month ago
0

Make sure that the Lambda function's resource policy allows API Gateway to invoke it.

profile pictureAWS
EXPERT
Uri
answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions