AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 332

A company has deployed a new REST API by using Amazon API Gateway. The company uses the API to access confidential data. The API must be accessed from only specific VPCs in the company.

Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

Amazon API Gateway resource policies are JSON policy documents that can be attached to an API to control access from specific AWS accounts, IP address ranges, or VPC endpoints/VPCs. By using a resource policy with a condition restricting access to specific VPC IDs, you can secure the private REST API as required. Security groups and network ACLs cannot be directly attached to an API Gateway REST API, and IAM roles do not natively filter incoming traffic based on source VPC IDs in this manner.