Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Lambda proxy integration in API Gateway #68

Open
MCoLoL opened this issue Jul 23, 2020 · 0 comments
Open

Unable to use Lambda proxy integration in API Gateway #68

MCoLoL opened this issue Jul 23, 2020 · 0 comments

Comments

@MCoLoL
Copy link

MCoLoL commented Jul 23, 2020

Hello,
i'm trying to do an integration with API Gateway and Lambda with the "Proxy integration".
I configured the bash script with the response as described in the documentation.

echo "{\"success\": true}" >&2
or this for apigw
"{\"isBase64Encoded\": false,\"statusCode\": 200,\"headers\": { \"Access-Control-Allow-Origin\": \"*\"},\"body\": \"OK\"}"

but seems that the script is not exiting succesfully and then apigw will response with a 500.
In the log of API GW seems that there is a RuntimeErrorException and the script exit with 6.

Those are the logs:

(a4be7bdd-e53a-409a-b804-28f9129cde0b) Endpoint response body before transformations:
{
"errorMessage": "Exited with code 6",
"errorType": "RuntimeErrorException",
"stackTrace": ""
}
(a4be7bdd-e53a-409a-b804-28f9129cde0b) Lambda execution failed with status 200 due to customer function error: Exited with code 6. Lambda request id: 9f7c4d24-afee-4ef9-ae14-14e8afcbb712
(a4be7bdd-e53a-409a-b804-28f9129cde0b) Method completed with status: 502

Any clue?
It would be great if the exit code will be 0 and if we can have the possibility to set the response needed by apigw.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant