0

I'm passing the addition key-value pairs from lambda function, same as mention in aws labs. Then in API Gateway I have setup the body mapping templates in integration request. (Check this).

But when request goes to the endpoint (PHP) then I'm unable to get any data. It is empty array print_r($_REQUEST);

I checked cloudWatch this is what it is showing. Endpoint request body after transformations: { "userData" : "{"city":"USA","Name":"Sanket","id":3}" }

Additional info - When I print print_r($_REQUEST); then it is empty array but when I print $request->getContent(); it shows all the data.

UPDATE - I Additional information here

1 Answer 1

1

You have mentioned that you have setup body mapping template in integration request. If you want to integrate a response then you should setup it in integration response, not in integration request.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the response. I have setup the integration response. But my point is the parameter pass (that is setup in integration request) should be accessible at the endpoint (the application hosted on ec2) at the first place. you are right that I have to setup the integration response but the endpoint is not receiving the parameter that I'm passing from the integration request.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.