QuestionQ9

Accelerate Workload Migration and Modernization

A company has developed APIs that use Amazon API Gateway Regional endpoints. The APIs invoke AWS Lambda functions and use API Gateway authentication mechanisms. Following a design review, a solutions architect identifies a group of APIs that do not need public access.

The solutions architect must design a solution that makes this group of APIs accessible only from a VPC. All APIs must be invoked by an authenticated user.

Which solution meets these requirements with the LEAST amount of effort?

  • A Create an internal Application Load Balancer (ALB). Create a target group. Select the Lambda function to call. Use the ALB DNS name to call the API from the VPC.
  • B Remove the DNS entry that is associated with the API in API Gateway. Create a hosted zone in Amazon Route 53. Create a CNAME record in the hosted zone. Update the API in API Gateway with the CNAME record. Use the CNAME record to call the API from the VPC.
  • C Update the API endpoint from Regional to private in API Gateway. Create an interface VPC endpoint in the VPCreate a resource policy, and attach it to the API. Use the VPC endpoint to call the API from the VPC.
  • D Deploy the Lambda functions inside the VPC Provision an EC2 instance, and install an Apache server. From the Apache server, call the Lambda functions. Use the internal CNAME record of the EC2 instance to call the API from the VPC.
Explanation

API Gateway private REST APIs can be called only from within a VPC by using an interface VPC endpoint. A resource policy can restrict invocation to the specified VPC or VPC endpoint, and the existing API Gateway authentication configuration continues to require authenticated callers. This changes the endpoint exposure without replacing the API Gateway-to-Lambda design.

Learn more

Community Discussion

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