Complete the code to specify the integration request mapping template in AWS API Gateway.
"requestTemplates": {"application/json": [1]
The request mapping template should pass the incoming JSON body to the backend integration. Using "{ \"body\": $input.body }" achieves this.
Complete the code to specify the integration response mapping template to extract a message from the backend response.
"responseTemplates": {"application/json": [1]
The response mapping template extracts the message field from the backend JSON response using $input.path('$.message').
Fix the error in the integration request mapping template to correctly pass a query parameter named 'id'.
"requestTemplates": {"application/json": "{ \"id\": \"[1]\" }"}
To access a query string parameter named 'id', use $input.params().querystring.id in the mapping template.
Fill both blanks to create a response mapping template that returns the status code and a message from the backend response.
"responseTemplates": {"application/json": "{ \"statusCode\": [1], \"message\": \"[2]\" }"}
The template extracts statusCode and message from the backend response using $input.path().
Fill all three blanks to create a request mapping template that passes a path parameter 'userId', a query parameter 'filter', and the request body to the backend.
"requestTemplates": {"application/json": "{ \"userId\": \"[1]\", \"filter\": \"[2]\", \"body\": [3] }"}
The template correctly accesses the path parameter userId, the query parameter filter, and the raw request body using $input.body.