
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A company uses Amazon API Gateway to run a private gateway with two REST APIs in the same VPC. The BuyStock RESTful web service calls the CheckFunds RESTful web service to ensure that enough funds are available before a stock can be purchased. The company has noticed in the VPC flow logs that the BuyStock RESTful web service calls the CheckFunds RESTful web service over the internet instead of through the VPC. A solutions architect must implement a solution so that the APIs communicate through the VPC.
Which solution will meet these requirements with the FEWEST changes to the code?
A
Add an X-API-Key header in the HTTP header for authorization.
B
Use an interface endpoint.
C
Use a gateway endpoint.
D
Add an Amazon Simple Queue Service (Amazon SQS) queue between the two REST APIs.
Explanation:
Correct Answer: B - Use an interface endpoint.
Why this is correct:
Private API Gateway Setup: The company is using Amazon API Gateway as a private gateway within a VPC. Private API Gateway endpoints are only accessible from within the VPC.
Current Issue: The BuyStock API is calling the CheckFunds API over the internet instead of through the VPC. This happens because when one API Gateway endpoint calls another API Gateway endpoint, it needs to resolve the DNS name of the target API.
Interface Endpoint Solution:
Why other options are incorrect:
A. Add an X-API-Key header in the HTTP header for authorization.
C. Use a gateway endpoint.
D. Add an Amazon Simple Queue Service (Amazon SQS) queue between the two REST APIs.
Key AWS Concepts:
Implementation Steps: