After creating a resource and a method…

In this example we will pass a header (var1 = “sub”) and an url var ( var2 = “email”) to Event in the lambda

1.-Go to Resources and select the method

2.- Select Method Request

3.- For the Header (sub) we create the declaration adding a header (add header)

4.- For the url var (email) we create a Query String (Add Query String):

5.- Go back to Method Execution and select Integration Request. Scroll down to Mapping Templates

6.- Add a content Type as application/Json and set the json sample

{
"email": "$input.params('email')",
"header":{"sub": "$input.params('sub')"}
}

7.- Go back to Method Execution and Test it