You should be able to call JSON.parse()
on the body passed into your function and JSON.stringify()
on the object you return in your body. That will handle converting between a string and Javascript object.
Having said that, I noticed the 1.0.3 release notes mentioned Custom Status code for non-proxy APIG integration (#2014). I haven’t had a chance to look at this properly but upgrading to 1.0.3 might give you the functionality you need.