Development with AWS Services

An Amazon API Gateway REST API must reject application/json requests with a missing quantity, a quantity below 1, or a missing X-Tenant header before invoking its integration. Which configurations together enforce these requirements? (Choose three.)

Choose 3 answers

Show the answer

Correct answersA. Associate a request validator that validates both the body and request parameters.C. Mark X-Tenant as a required header in the method request configuration.D. Associate an application/json body model requiring quantity with a numeric minimum of 1.

AWhy this is right: Body and parameter validation must both be enabled to enforce all the stated constraints.

BWhy not this: A response model describes output rather than enforcing incoming request requirements.

CWhy this is right: Required method request parameters let the validator reject a missing or blank header.

DWhy this is right: The body model defines the required quantity property and its permitted minimum value.

EWhy not this: An integration mapping template transforms input; it is not the request-validation mechanism.

FWhy not this: Parameter validation alone does not evaluate the JSON body against its model.

The request model defines the body constraints, the method request marks the header as required, and the validator enforces both. A parameters-only validator checks required parameters but does not enforce the body's quantity constraints.