Execution failed due to configuration error: Invalid permissions on Lambda function

by Thomas Beutel

I recently implemented some Lambda functions and API Gateways using swagger definitions from a colleague. But when I tried to test the gateways, I was always getting the message “Execution failed due to configuration error: Invalid permissions on Lambda function”. This had me stumped because I had set up the appropriate permissions on my lambdas.

Well I finally figured out the problem after much Googling. It turns out that the swagger definitions were pointing to my colleagues lambda functions and not to mine. The clue came from this comment on Github:

https://github.com/awslabs/serverless-application-model/issues/59#issuecomment-296681182

Essentially what I needed to do was to delete the lambda functions in the AWS Gateway integration request section and then add my lambdas back in. Here are a couple of screenshots showing the wrong-account lambda and the correct lambda.

 

 

So this is a good reminder to check account numbers when you import swagger information from another account.