Am using API gateway to trigger a Lambda function, using Lambda Proxy integration, however the request body is encoded base64, why is that? and how can I change it to be JSON to stringify JSON?
If I am understanding your question correct, you are sending non base64 encoded JSON payload as request to API gateway, however your Lambda is receiving it as base64 encoded string.
It seems that you are not setting application/json
as your request content-type
.
You can see in this table how API gateway decides whether Integration Request Payload
(last column) is Base64-encoded string
or some other type.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings-workflow.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With