A REST API in Amazon API Gateway exposes confidential data and must be callable only from specific company VPCs. Which configuration enforces access from only those VPCs?
Choose an answer
Tap an option to check your answer.
Correct answer: Create and attach a resource policy to the API in API Gateway that allows access only from the specific VPC IDs..
Why this is the answer
API Gateway resource policies are JSON policies that you attach to an API to control who can invoke the API and how. They support conditions like aws:SourceVpc or aws:SourceIp to restrict access based on the VPC ID or IP address, making them ideal for this scenario. Security groups are associated with EC2 instances or ENIs, not directly with API Gateway APIs. Attaching an IAM role to the API Gateway API primarily controls what the API can access, not who can access the API itself. ACLs (Access Control Lists) are typically used with VPCs or network load balancers, not directly with API Gateway APIs for inbound access control.
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