Integration tests call a third-party payment API that has no sandbox. The team wants an API Gateway REST API to return a predictable response so the tests never call the provider. What should the developer configure?
Show the answer
Correct answerC. A mock integration whose integration response mapping template returns a canned body
AWhy not this: Stage caching still sends uncached requests, including the first one, to the live provider.
BWhy not this: Forwarding each request through Lambda still calls the provider for every test.
CWhy this is right: A mock integration answers from API Gateway itself, with the response body defined in the integration response mapping template.
DWhy not this: A stage variable only chooses which backend URL is called; pointing it at production calls the live provider.
An API Gateway mock integration returns a response without calling any backend: its request template sets the status code and its integration response mapping template supplies the body. Caching, Lambda proxies and HTTP proxies all still reach the real provider at least once.