A developer integrates an ecommerce platform with multiple third-party payment APIs, but those providers offer no test environment. The developer needs to validate integration logic without calling the real third-party APIs. Which solution meets this need?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an Amazon API Gateway REST API per third-party API, use the Mock integration for requests, and configure integration responses using sample payloads captured from the real APIs..
Why this is the answer
The correct solution uses Amazon API Gateway's Mock integration, which allows the API Gateway itself to generate responses without forwarding the request to a backend. This is ideal for simulating third-party APIs when no test environment is available. You can configure the integration response with sample payloads captured from real API calls, ensuring the simulated responses accurately reflect the expected structure and data. Creating an API Gateway REST API with a gateway response is incorrect because gateway responses are for errors or specific conditions, not for simulating successful backend integrations. AWS AppSync is for GraphQL APIs and while it has mock capabilities, API Gateway's REST API mock integration is a more direct and common solution for simulating RESTful third-party APIs. Using Lambda functions with Route 53 Resolver is overly complex and introduces unnecessary compute overhead for a simple mocking requirement; API Gateway's built-in mock integration is more efficient.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed