### Lambda
First let's take a look at the data our Lambda is expecting:
```JSON
{
"Animal": "Cat",
"Color": "Blue"
}
```
### GET
Now, we can take a look at how to Map a GET API to these parameters
Under the Integration Request of the API, make sure the "Use Lambda Proxy integration" checkbox is **Unchecked**.
Now, under Body Mapping Templates at the bottom,
add a new Mapping Template with "When there are no templates defined (recommended)"
as the selected pass-through functionality and ```application/json``` as the Content-Type.
Then, under the template put the following:
```JSON
{
"Animal": "$input.params('Animal')",
"Color": "$input.params('Color')"
}
```
This means that anyone calling your API will be able to use ```?Animal=Cat&Color=Blue``` to pass parameters to your Lambda function.
### POST
A POST is largely the same as a GET method, so follow that example up until we build up the template.
For a POST, the template should look like this:
```JSON
$input.body
```
I know this looks silly, but that's really it. Because a POST comes with a body, as long as that body is in the right format,
we can pass it directly to the Lambda function. Now if this body doesn't match, then we have to get a little more creative.
Calling the API simply means that you would include the following in the body to supply parameters directly to the Lambda function:
```JSON
{
"Animal": "Cat",
"Color": "Blue"
}
```