A logistics company runs a Lambda function in private subnets of its VPC. The function calls a model on Amazon Bedrock and also reads an Amazon RDS database in the same VPC.
Security policy forbids any route from these subnets to the internet, so the function must reach Bedrock privately. The SDK code should not need a different endpoint URL, and the security team wants the Bedrock access limited to the model-invocation actions the function needs.
Which solution meets these requirements?
Choose one answer.
AA. Create an interface VPC endpoint for bedrock-runtime, turn on private DNS, and attach an endpoint policy that allows only the model-invocation actions the function needs.
BB. Attach a NAT gateway in a public subnet, and route the private subnets' default traffic through it so the function can reach the public Bedrock endpoint for model calls.
CC. Create an interface endpoint for the bedrock service name, and point the function's model calls at that endpoint.
DD. Move the function outside the VPC so it can reach the public Bedrock endpoint, and connect to the database through its public address.
B. Wrong: A NAT gateway gives the subnets a route to the internet, which the security policy forbids. It would work for reachability, but it breaks the stated constraint.
C. Wrong: The bedrock service name is a separate endpoint from bedrock-runtime. Model calls are served by the bedrock-runtime endpoint, so this route would not carry them.
D. Wrong: Running outside the VPC means the database must have a public route, which the security policy also rules out. The option fails the no-internet rule and the private database access.
Explanation
An interface VPC endpoint for bedrock-runtime lets the function reach model calls over private connectivity, with no internet route. Private DNS lets the SDK keep the standard service name, so the code does not change. An endpoint policy can restrict which Bedrock actions pass through the endpoint.
Private DNS keeps the SDK's normal Bedrock name, and the endpoint policy limits calls to model invocation.
Want more on AI service access and data privacy? The 5 full-length practice sets have 11 more AI service access and data privacy questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets →