8.2 PrivateLink VPC Endpoints & Network Isolation
Key Takeaways
- AWS PrivateLink interface VPC endpoints establish private, secure connectivity between VPC workloads and Amazon Bedrock, ensuring that inference, management, and retrieval data never traverse the public internet.
- Amazon Bedrock provides distinct interface VPC endpoint service names: com.amazonaws.{region}.bedrock for control-plane management APIs, com.amazonaws.{region}.bedrock-runtime for model inference APIs, and com.amazonaws.{region}.bedrock-agent-runtime for agent and knowledge base retrieval APIs.
- VPC endpoint policies attached to interface endpoints act as an indispensable perimeter guardrail, restricting which IAM principals, AWS accounts, or specific model ARNs can be accessed from inside the VPC.
- Complete network isolation for Bedrock Knowledge Bases requires configuring an interface VPC endpoint for Amazon OpenSearch Serverless (com.amazonaws.{region}.aoss) coupled with an AOSS network policy of type 'vpc' bound to that endpoint ID.
- Private DNS resolution must be enabled on interface VPC endpoints so that standard AWS SDK API calls (bedrock-runtime.{region}.amazonaws.com) resolve automatically to the private IP addresses of the endpoint Elastic Network Interfaces (ENIs).
8.2 PrivateLink VPC Endpoints & Network Isolation
This independent study guide by OpenExamPrep helps candidates prepare for the AWS Certified Generative AI Developer - Professional (AIP-C01) examination. Highly regulated industries—including banking, healthcare, defense, and government—mandate that proprietary data, personally identifiable information (PII), and intellectual property must never traverse the public internet. When enterprise applications invoke foundation models, submit prompts containing confidential customer records, or perform vector embeddings over proprietary document corpora, network traffic must remain strictly confined within private network boundaries.
AWS PrivateLink enables private connectivity between Amazon Virtual Private Clouds (VPCs) and supported AWS services without requiring an Internet Gateway (IGW), NAT Gateway, Network Address Translation (NAT) instances, or AWS Direct Connect public virtual interfaces. Understanding how to configure, secure, and troubleshoot PrivateLink endpoints for Amazon Bedrock and its vector storage dependencies is a core domain on the AIP-C01 examination.
Architecture of AWS PrivateLink for Amazon Bedrock
When you provision an interface VPC endpoint for Amazon Bedrock, AWS creates Elastic Network Interfaces (ENIs) with private IP addresses in the private subnets of your VPC. Traffic destined for Bedrock is routed directly across the AWS private network backbone to the Bedrock service infrastructure.
┌────────────────────────────────────────────────────────┐
│ Amazon VPC (10.0.0.0/16) - Private Subnet (10.0.1.0/24)│
│ │
│ ┌───────────────────────┐ │
│ │ EC2 / ECS / Lambda │ │
│ │ App Microservice │ │
│ └──────────┬────────────┘ │
│ │ HTTPS (443) │
│ ▼ │
│ ┌───────────────────────┐ │
│ │ Interface VPC ENI │ (Private IP: 10.0.1.50) │
│ │ (bedrock-runtime) │ │
│ └──────────┬────────────┘ │
└─────────────┼──────────────────────────────────────────┘
│ AWS Private Backbone Network (Zero Public Internet)
▼
┌────────────────────────────────────────────────────────┐
│ Amazon Bedrock Service Infrastructure │
│ - Anthropic Claude / Amazon Nova Foundation Models │
└────────────────────────────────────────────────────────┘
The Three Critical Service Names
Amazon Bedrock separates its service architecture into distinct VPC endpoint service names. Configuring the wrong service name is one of the most common causes of network failure:
| VPC Endpoint Service Name | Operational Scope | APIs Supported | Common Use Case |
|---|---|---|---|
com.amazonaws.{region}.bedrock | Control Plane | CreateKnowledgeBase<br/>CreateAgent<br/>CreateModelCustomizationJob<br/>CreateProvisionedModelThroughput | DevOps pipelines, infrastructure provisioning microservices |
com.amazonaws.{region}.bedrock-runtime | Data Plane (Model Inference) | InvokeModel<br/>InvokeModelWithResponseStream<br/>ApplyGuardrail | Core application microservices generating prompt completions |
com.amazonaws.{region}.bedrock-agent-runtime | Data Plane (Agents & RAG) | InvokeAgent<br/>Retrieve<br/>RetrieveAndGenerate<br/>InvokeFlow | Conversational chatbots, enterprise search engines, agent runtimes |
com.amazonaws.{region}.bedrock-agent | Control Plane (Agents & KBs) | CreateAgentActionGroup<br/>UpdateKnowledgeBase<br/>PrepareAgent | Administrative agent orchestration and lifecycle management |
[!IMPORTANT] If an application in a private subnet needs to execute
bedrock.invoke_model(), provisioning an interface endpoint forcom.amazonaws.{region}.bedrockwill not work. The invocation will fail with a connection timeout becauseinvoke_model()targets the data plane endpoint (bedrock-runtime), which requirescom.amazonaws.{region}.bedrock-runtime.
Private DNS Resolution Mechanics
When creating an interface VPC endpoint, enabling Private DNS (PrivateDnsEnabled: true) is essential.
- Without Private DNS: The application must be explicitly configured to send API requests to the unique, long VPC endpoint DNS hostname (e.g.,
vpce-0123456789abcdef0-us-east-1a.bedrock-runtime.us-east-1.vpce.amazonaws.com). This requires custom code modifications and breaks standard SDK defaults. - With Private DNS: AWS creates a private hosted zone in Amazon Route 53 that resolves the standard public service DNS hostname (
bedrock-runtime.us-east-1.amazonaws.com) directly to the private IP addresses of the interface endpoint ENIs within your VPC. Applications can use standard AWS SDK clients without changing endpoint URLs, and traffic automatically routes over PrivateLink.
Prerequisites for Private DNS:
- The VPC must have both
enableDnsHostnamesandenableDnsSupportset totrue. - Security groups attached to the interface endpoint ENIs must permit inbound HTTPS (port 443) traffic from the private subnets hosting application compute.
- Security groups attached to the application compute must permit outbound HTTPS (port 443) traffic to the VPC endpoint security group or subnet CIDR.
VPC Endpoint Security Policies: Perimeter Defense
An interface VPC endpoint allows attaching a VPC Endpoint Policy. An endpoint policy is an IAM resource policy attached directly to the endpoint. It does not replace identity-based policies, but rather acts as a perimeter filter: requests passing through the endpoint are denied unless both the caller's IAM policy AND the endpoint policy permit the action.
Use Case: Restricting Allowed Accounts and Models
Security compliance often dictates that corporate compute inside a private VPC must only access models within the corporate AWS account and must never invoke unapproved third-party or experimental models.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "RestrictVpcBedrockAccess",
"Effect": "Allow",
"Principal": "*",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": [
"arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-3-5-sonnet-20240620-v1:0",
"arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-pro-v1:0",
"arn:aws:bedrock:us-east-1:123456789012:provisioned-model/*"
],
"Condition": {
"StringEquals": {
"aws:PrincipalAccount": "123456789012"
}
}
}
]
}
What this policy enforces:
- Prevent Exfiltration to External Accounts: If a rogue employee attempts to use their own AWS credentials from inside an EC2 instance in this VPC to invoke models in their personal account, the
aws:PrincipalAccountcondition blocks the request. - Prevent Use of Unapproved Models: Calls to unapproved models (e.g., unauthorized open-source weights or external experimental models) are blocked at the network perimeter.
Securing Bedrock Knowledge Bases Vector Infrastructure
A production RAG system involves more than foundation models; it connects to Amazon OpenSearch Serverless (AOSS) vector collections and Amazon S3 document buckets. Full network isolation requires securing this supporting infrastructure.
OpenSearch Serverless Network Policies
Amazon OpenSearch Serverless manages network accessibility through Network Policies. An AOSS collection can be configured in two modes:
- Public: Accessible from the internet (subject to IAM data access policies).
- VPC: Accessible exclusively through designated interface VPC endpoints.
To isolate an OpenSearch Serverless vector collection:
- Provision an interface VPC endpoint for the AOSS service:
com.amazonaws.{region}.aoss. - Create an OpenSearch Serverless Network Policy of type
vpcreferencing the VPC endpoint ID:
[
{
"Rules": [
{
"Resource": ["collection/enterprise-knowledge-base"],
"ResourceType": "collection"
},
{
"Resource": ["collection/enterprise-knowledge-base"],
"ResourceType": "dashboard"
}
],
"AllowFromPublic": false,
"SourceVPCEs": ["vpce-0123456789abcdef0"]
}
]
- Attach an AOSS Data Access Policy granting the Bedrock Knowledge Base service execution role permissions (
aoss:CreateCollectionItems,aoss:UpdateCollectionItems,aoss:DescribeCollectionItems,aoss:APIAccessAll) on the collection and its indexes.
S3 Data Source Network Isolation
To ensure raw documents stored in Amazon S3 are accessed privately:
- Provision an S3 VPC Gateway Endpoint in the VPC.
- Configure the S3 bucket policy to deny any traffic that does not originate from the VPC Gateway Endpoint using the
aws:sourceVpcecondition key, while allowing the Bedrock service principal (bedrock.amazonaws.com) to read objects during knowledge base synchronization.
Common Exam Traps & High-Stakes Scenarios
- Trap: Provisioning only
com.amazonaws.{region}.bedrockfor Inference. Candidates frequently confuse the management endpoint with the runtime endpoint. When a scenario mentions Lambda functions or ECS tasks in private subnets invoking models, the required service name iscom.amazonaws.{region}.bedrock-runtime. - Trap: Forgetting the Agent Runtime Endpoint. If an application invokes an Amazon Bedrock Agent via
bedrock-agent-runtime:InvokeAgent, thebedrock-runtimeendpoint is insufficient. The architecture must provision an interface endpoint forcom.amazonaws.{region}.bedrock-agent-runtime. - Trap: Missing Inbound Security Group Rules on Endpoint ENIs. An interface endpoint creates ENIs inside your private subnets. The security group attached to these ENIs must have an inbound rule allowing TCP port 443 (HTTPS) from the security group or CIDR block of the application compute instances. Without this rule, requests hang and timeout.
- Trap: Modifying AOSS Network Policies Post-Creation. When creating an OpenSearch Serverless collection, the encryption policy must exist before collection creation, and network policies must bind the VPC endpoint appropriately. Failing to bind the VPC endpoint before ingestion results in connectivity failures.
A financial services institution runs containerized microservices on Amazon ECS within private subnets in an Amazon VPC with no internet gateway, NAT gateway, or public IP addresses. The microservices need to invoke Amazon Bedrock foundation models to summarize transaction records. An engineer provisions an interface VPC endpoint for 'com.amazonaws.us-east-1.bedrock' and enables Private DNS. However, when the ECS containers call the InvokeModel API, the client requests consistently hang and fail with network connection timeouts. What is the root cause of this failure and how should it be resolved?
An enterprise information security team mandates that workloads inside a corporate Amazon VPC must be prevented from exfiltrating proprietary training data to unapproved external AWS accounts through Amazon Bedrock. Developers inside the VPC have valid AWS credentials for external personal accounts. The security architect must enforce a network perimeter boundary to ensure that any Bedrock API calls initiated from within the VPC can only target foundation models approved by the enterprise and must only be authenticated using IAM principals belonging to the corporate AWS account (111122223333). Which solution fulfills this requirement with the least operational overhead?
A healthcare provider is designing an enterprise RAG architecture using Amazon Bedrock Knowledge Bases and Amazon OpenSearch Serverless. The solution must comply with HIPAA regulations, requiring that neither the vector search queries nor document ingestion traffic traverse the public internet. Which combination of networking configurations is required to fully isolate the vector search infrastructure?