# Lambda integration response template mapping

**URL:** <https://forum.serverless.com/t/lambda-integration-response-template-mapping/688>\
**Category:** Serverless Framework\
**Created:** [October 29, 2016, 7:54pm UTC](https://forum.serverless.com/t/lambda-integration-response-template-mapping/688 "2016-10-29T19:54:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zacharyrote](https://avatars.discourse-cdn.com/v4/letter/z/258eb7/32.png) [@zacharyrote](https://forum.serverless.com/u/zacharyrote)\
**Post date:** [October 29, 2016, 7:54pm UTC](https://forum.serverless.com/t/lambda-integration-response-template-mapping/688/1 "2016-10-29T19:54:38Z")

</div>

Trying to map the lambda output to a template such that the aws gateway output matches the expected output.

For example  
Lambda Output  
{  
“statusCode”: number,  
“body”: string  
"headers": {  
“key”: “value”  
…  
}  
}

Attempting a response template in serverless.yml, not working as expected.  
response:  
template: $input.json(’$.body’)

All examples I see reference $input ( although this is the output ) and not sure if that is correct.  
If not what are my options other than $input for response template mapping.

Z
