AWS API Gateway : Convert response to XML


I am getting a string value (xml to string) from lambda backend which should be returned to end user in application/xml format. How can I achieve this?


You can specify an Integration Response that returns XML, along with a mapping template to format XML using the object returned from Lambda.

Sample Integration Response

I do not believe there is a default format conversion to XML. A simple mapping template might be like this:

#foreach($key in $root.keySet())

Leave a Reply