QuestionQ65

VerifiedDevelopment with AWS Services

A developer is modifying an Amazon API Gateway REST API to include a mock endpoint. The developer needs to update the integration request mapping template so that the endpoint returns specific HTTP status codes for mock integration requests according to different conditions.

Which statement satisfies these requirements?

Explanation

For an API Gateway REST API mock integration, the integration request mapping template selects the response by producing a JSON statusCode. A conditional template can inspect the incoming scope parameter with $input.params('scope'), return status code 200 for internal, and return 500 for all other values. This is the documented mock-integration conditional-response pattern.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!