nerdexam
Amazon

DOP-C02 · Question #346

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

The correct answer is A. Create and attach a resource policy to the API Gateway API. Configure the resource policy to. API Gateway resource policies are used to control access to your API based on various conditions, such as IP addresses, VPC IDs, or VPC endpoints. In this case, you can create a resource policy that explicitly allows access to the API only from requests originating from the speci

Submitted by priya_blr· Mar 6, 2026Security & Compliance

Question

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?

Options

  • ACreate and attach a resource policy to the API Gateway API. Configure the resource policy to
  • BAdd a security group to the API Gateway API. Configure the inbound rules to allow only the
  • CCreate and attach an IAM role to the API Gateway API. Configure the IAM role to allow only the
  • DAdd an ACL to the API Gateway API. Configure the outbound rules to allow only the specific VPC

How the community answered

(31 responses)
  • A
    74% (23)
  • B
    6% (2)
  • C
    3% (1)
  • D
    16% (5)

Explanation

API Gateway resource policies are used to control access to your API based on various conditions, such as IP addresses, VPC IDs, or VPC endpoints. In this case, you can create a resource policy that explicitly allows access to the API only from requests originating from the specified VPC IDs. This approach is the most direct and secure way to restrict access to your API. A resource policy provides fine-grained control over which VPCs can access the API, ensuring that only the specified VPCs within the company can communicate with the API. This is a highly effective way to control access to sensitive resources. Since the API is used to access confidential data, restricting access at the API Gateway level with resource policies ensures that unauthorized requests from external VPCs or IP addresses are blocked, reducing the attack surface. Using resource policies is the correct approach to restrict access to your API to specific VPCs, providing the necessary security for accessing confidential data.

Topics

#API Gateway#Resource Policies#VPC Access#Network Security

Community Discussion

No community discussion yet for this question.

Full DOP-C02 Practice