0
votes

in my Integration Request I have Body Mapping Tempates for application/xml, application/json (the same template body - reads URL parameters and create JSON body as lambda input).

Client is requesting API with application/json or application/xml. How to make response body format depending on request Content-Type in API Gateway only?

Regards, Radek

1

1 Answers

0
votes

Create ANY integration and handle everything with Lambda. You can avoid all the mappings and handle everything in code and we found that much easier.

More details here on ANY Integration,

https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-set-up-simple-proxy.html

Hope it helps.