Skip to main content
Ameerpet, Hyderabad · Classroom & live online
Cloud Soft Solutions

Amazon Bedrock Security and Private Networking: IAM, PrivateLink, KMS, Logging and Data Residency

Enterprise security guide for Amazon Bedrock: IAM model access, VPC interface endpoints, KMS keys, model invocation logging, CloudTrail events, data retention modes, and exactly what AWS says about cross-Region inference and data residency, with a reference architecture.

Enterprise reference architecture for Amazon Bedrock with VPC endpoints, IAM, KMS, invocation logging and CloudTrail
Last updated · 13 min read · 2,781 words

Enterprise reference architecture for Amazon Bedrock with VPC endpoints, IAM, KMS, invocation logging and CloudTrail

When an enterprise security team reviews an Amazon Bedrock workload, the questions are always the same. Who can call which models? Does traffic leave our network? Where are prompts stored, and for how long? Can we prove who asked what? Can a request be processed in another country? This tutorial answers each question with the specific AWS control, the exact IAM, API and CloudTrail names from the documentation, and a reference architecture you can adapt. Everything was checked against AWS documentation on 5 December 2026. Where the docs are precise about data residency, we quote them rather than paraphrase.

What AWS says it does with your prompts

Start with the facts the security review will ask for first.

  • Model providers don't see your traffic. Bedrock runs each provider's model in a Model Deployment Account owned and operated by the Bedrock service team. The data protection page states that model providers don't have access to those accounts, so they "don't have access to Amazon Bedrock logs or to customer prompts and completions."
  • Retention is a setting you control, per Region. The data retention page describes modes: none (zero retention), default (the model's own policy applies; AWS may retain data for safety and abuse prevention), aws_review (retention for AWS automated or human review, required by some newer models), and inherit. The setting is per Region and does not propagate. The page also states: "Amazon Bedrock does not share your content with model providers for any current mode." A model that requires a more permissive mode than yours returns ValidationException on bedrock-runtime.
  • You can enforce retention policy organisation-wide. The condition key bedrock:DataRetentionMode on bedrock:PutAccountDataRetention, bedrock:CreateProject and bedrock:UpdateProject lets an SCP deny anything other than none. That also blocks models that require retention, which is the point.
  • TLS is mandatory. AWS requires TLS 1.2 and recommends TLS 1.3. FIPS endpoints (bedrock-fips, bedrock-runtime-fips) exist in a subset of US and Canadian Regions.

IAM: controlling model access

How model access works now

In commercial Regions there is no longer an access request to submit on the console's Model access page (that page now applies to AWS GovCloud). Access to most models is enabled on first invocation, provided the caller has the AWS Marketplace permissions aws-marketplace:Subscribe, aws-marketplace:Unsubscribe and aws-marketplace:ViewSubscriptions for models sold through Marketplace. Anthropic models earlier than Claude Opus 4.7 still need a one-time use case form. Two consequences for security teams:

  • Denying aws-marketplace:Subscribe alone does not block the first invocation. To block a model from the start, deny bedrock:InvokeModel at the SCP or IAM level.
  • Deleting a model agreement doesn't prevent future use either, because the next invocation recreates it. Use deny policies.

Allow only approved models

Denying bedrock:InvokeModel also blocks the Converse APIs and StartAsyncInvoke. A typical application role allows a short list of models and one inference profile:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "InvokeApprovedProfile",
      "Effect": "Allow",
      "Action": ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"],
      "Resource": "arn:aws:bedrock:ap-south-1:111122223333:inference-profile/<profile-id>"
    },
    {
      "Sid": "InvokeModelsBehindProfile",
      "Effect": "Allow",
      "Action": ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"],
      "Resource": "arn:aws:bedrock:*::foundation-model/<model-id>",
      "Condition": {
        "StringEquals": {
          "bedrock:InferenceProfileArn":
            "arn:aws:bedrock:ap-south-1:111122223333:inference-profile/<profile-id>"
        }
      }
    }
  ]
}

The pattern follows the AWS geographic inference profile example, where the foundation model resources are listed for each destination Region; using * for the Region plus the bedrock:InferenceProfileArn condition is a simplification, so test it with the IAM policy simulator or list the destination Regions explicitly as AWS does.

Deny a model everywhere

{
  "Version": "2012-10-17",
  "Statement": {
    "Sid": "DenyInference",
    "Effect": "Deny",
    "Action": [
      "bedrock:InvokeModel",
      "bedrock:InvokeModelWithResponseStream",
      "bedrock:CreateModelInvocationJob"
    ],
    "Resource": "arn:aws:bedrock:*::foundation-model/<model-id>"
  }
}

AWS notes this identity policy can also be used as an SCP. Combine it with the bedrock:GuardrailIdentifier condition key if every model call must carry an approved guardrail; the Bedrock Guardrails tutorial covers that key and its limits.

Interface endpoints let workloads in private subnets reach Bedrock without an internet gateway, NAT device, VPN or Direct Connect. Bedrock exposes separate endpoint services for each API family:

Service nameUse it for
com.amazonaws.<region>.bedrock-runtimeInvokeModel, Converse, ApplyGuardrail
com.amazonaws.<region>.bedrock-agent-runtimeRetrieve, RetrieveAndGenerate, agent invocation
com.amazonaws.<region>.bedrockControl plane: guardrails, logging configuration, customization jobs
com.amazonaws.<region>.bedrock-agentBuild-time APIs: knowledge bases, data sources, agents
com.amazonaws.<region>.bedrock-mantleThe Mantle API family (OpenAI-compatible APIs on bedrock-mantle)
bedrock-fips, bedrock-runtime-fipsFIPS endpoints in us-east-1, us-east-2, us-west-2, ca-central-1 and the two GovCloud Regions

With private DNS enabled, SDK calls to bedrock-runtime.<region>.amazonaws.com resolve to the endpoint and need no code change. Without private DNS, pass the endpoint URL:

import boto3

client = boto3.client(
    "bedrock-runtime",
    region_name="ap-south-1",
    endpoint_url="https://<vpce-id>.bedrock-runtime.ap-south-1.vpce.amazonaws.com",
)
resp = client.converse(
    modelId="<model or inference profile ID>",
    messages=[{"role": "user", "content": [{"text": "Hello"}]}],
)

Attach an endpoint policy so the endpoint itself only permits the actions you expect. The default policy allows full access. A runtime endpoint that should only serve inference can use:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Principal": "*",
      "Effect": "Allow",
      "Action": ["bedrock:InvokeModel", "bedrock:InvokeModelWithResponseStream"],
      "Resource": "*"
    }
  ]
}

Add bedrock:ApplyGuardrail if the same endpoint serves guardrail checks. One documented side effect to plan for: aws:SourceIp is not present in the request context when a request arrives through a VPC endpoint, so IAM conditions based on source IP can never match for those calls. Use endpoint policies and network controls instead.

Private endpoints cover your calls to Bedrock. Data stores behind a knowledge base are a separate question: an OpenSearch Serverless collection can be restricted to VPC access, whereas OpenSearch managed cluster domains must use public access to work with knowledge bases. Model customization and batch inference jobs can run with your VPC configuration. Our Knowledge Bases RAG tutorial has the store-by-store details.

Encryption with AWS KMS

Bedrock lets you supply customer managed KMS keys for these resources, among others:

ResourceWhere you set the key
Model customization jobs and custom modelscustomModelKmsKeyId in CreateModelCustomizationJob
AgentscustomerEncryptionKeyArn in CreateAgent
Knowledge base ingestion (transient data)kmsKeyArn in CreateDataSource / UpdateDataSource
RetrieveAndGenerate session datasessionConfiguration.kmsKeyArn
GuardrailskmsKeyId in CreateGuardrail (AWS managed key by default)
Model evaluation jobscustomerEncryptionKeyId in CreateEvaluationJob
Vector stores, S3 data, secretsConfigured on OpenSearch, S3 (SSE-KMS), S3 Vectors and Secrets Manager respectively
Invocation log bucketSSE-KMS on the bucket, with a key policy allowing bedrock.amazonaws.com to call kms:GenerateDataKey

Scope every key policy with aws:SourceAccount and aws:SourceArn conditions as the AWS examples do, so only Bedrock acting for your account can use the key.

Model invocation logging to CloudWatch Logs and S3

Invocation logging records the full request, response and metadata for Converse, ConverseStream, InvokeModel and InvokeModelWithResponseStream calls on the bedrock-runtime endpoint. It is disabled by default, is configured per account and Region, and only supports destinations in the same account and Region. Calls through bedrock-mantle are not captured.

bedrock = boto3.client("bedrock", region_name="ap-south-1")

bedrock.put_model_invocation_logging_configuration(
    loggingConfig={
        "cloudWatchConfig": {
            "logGroupName": "/bedrock/invocations",
            "roleArn": "arn:aws:iam::111122223333:role/BedrockLoggingRole",
            "largeDataDeliveryS3Config": {
                "bucketName": "example-bedrock-logs",
                "keyPrefix": "large",
            },
        },
        "s3Config": {"bucketName": "example-bedrock-logs", "keyPrefix": "invocations"},
        "textDataDeliveryEnabled": True,
        "imageDataDeliveryEnabled": False,
        "embeddingDataDeliveryEnabled": False,
        "videoDataDeliveryEnabled": False,
    }
)

The CloudWatch role trusts bedrock.amazonaws.com and needs logs:CreateLogStream and logs:PutLogEvents. Bodies up to 100 KB are inline; larger bodies and binary data go to S3. Each record includes identity.arn, modelId, token counts and optional caller-supplied requestMetadata, which makes per-team cost attribution straightforward with CloudWatch Logs Insights.

Treat these logs as sensitive data. They hold prompts in plain text, including content a guardrail blocked or masked. Restrict access, set retention, and consider CloudWatch Logs data protection to mask PII in the log group.

CloudTrail: who called what

CloudTrail records the caller, source IP, time and request parameters; the documented InvokeModel example event carries the model ID, not the prompt, so you need invocation logging for content. Which events you get depends on the API:

APICloudTrail categoryWhat to enable
InvokeModel, InvokeModelWithResponseStream, Converse, ConverseStreamManagement events (logged by default)A trail for long-term retention
Retrieve, RetrieveAndGenerateData eventsAdvanced selector for AWS::Bedrock::KnowledgeBase
ApplyGuardrail and guardrail evaluations during invocationData eventsAWS::Bedrock::Guardrail
InvokeAgent, InvokeFlowData eventsAWS::Bedrock::AgentAlias, AWS::Bedrock::FlowAlias
Control plane (create guardrail, change logging, and so on)Management eventsOn by default

Data events cost extra. Two analysis tips from the docs: for cross-Region calls, additionalEventData.inferenceRegion shows where inference actually ran; and streaming calls produce an extra stream-completion event with eventType AwsServiceEvent carrying token counts, so filter on AwsApiCall when counting invocations. Amazon GuardDuty analyses these logs and can flag suspicious Bedrock activity such as removing guardrails.

Cross-Region inference and data residency

Inference profiles let Bedrock route a request from your source Region to another Region for capacity. This is where data residency reviews need precise wording.

Geographic inference profiles

Profiles tied to a geography carry prefixes such as us, eu, apac and in. The geographic cross-Region inference page states that requests "stay within that geography", that "your input prompts and output results might move outside of your source Region", and that "to the extent we store data for abuse detection, your input prompts and output results will be stored in the destination region." Data is "transmitted encrypted across Amazon's secure network." The general page adds that cross-Region traffic stays on the AWS network, CloudTrail logs the request in your source Region, and there is no additional routing cost.

Do not rely on the prefix alone. AWS explicitly advises: if you have data residency requirements, call GetInferenceProfile from every source Region you plan to use and verify every destination Region in the models list. Destination lists can include opt-in Regions you have not enabled, where prompts and outputs may be stored for abuse detection.

bedrock = boto3.client("bedrock", region_name="ap-south-1")
profile = bedrock.get_inference_profile(inferenceProfileIdentifier="<profile-id>")
for m in profile["models"]:
    print(m["modelArn"])   # the Region in each ARN is a possible destination

Global inference profiles

Profiles with the global. prefix route to supported commercial Regions worldwide and are documented as roughly 10% cheaper on token pricing. They suit cost-sensitive workloads without residency constraints. IAM needs three statements: the profile in the source Region, the foundation model in the source Region, and the Region-less foundation model ARN arn:aws:bedrock:::foundation-model/<model> with aws:RequestedRegion set to unspecified. To forbid global routing across an organisation, AWS gives this SCP:

{
  "Effect": "Deny",
  "Action": "bedrock:*",
  "Resource": "*",
  "Condition": {
    "StringEquals": {"aws:RequestedRegion": "unspecified"},
    "ArnLike": {
      "bedrock:InferenceProfileArn": "arn:aws:bedrock:*:*:inference-profile/global.*"
    }
  }
}

If your SCPs use a Region allowlist, either allow all destination Regions of the geographic profiles you use or add an inference-profile exception scoped with bedrock:InferenceProfileArn; otherwise cross-Region calls fail when routed to a blocked Region. Guardrails with the Standard tier and Automated Reasoning checks also use cross-Region processing within a geography, so include them in the residency review.

Reference architecture

The diagram shows a private RAG chatbot for an internal enterprise user base, deployed in one Region.

  Corporate network
        |
   (Direct Connect / VPN)
        |
+-------v------------------------- VPC (private subnets only) ---------------+
|                                                                             |
|  ALB (internal) --> App on ECS/EKS/Lambda  (task role: least-privilege IAM)  |
|                        |          |            |                            |
|        VPCE bedrock-runtime   VPCE bedrock-agent-runtime   VPCE logs / S3 GW |
|          (endpoint policy)      (endpoint policy)                            |
+------------|---------------------|-------------------------------------------+
             |                     |
             v                     v
   Converse + guardrail     Retrieve / RetrieveAndGenerate
   (pinned version)          -> Knowledge base (service role)
             |                     -> OpenSearch Serverless (VPC access, KMS)
             |                     -> S3 documents (SSE-KMS)
             v
   Geographic inference profile, destinations verified with GetInferenceProfile

   Observability: invocation logs -> CloudWatch Logs (KMS, data protection)
                                   -> S3 (SSE-KMS, large payloads)
                  CloudTrail: management + KnowledgeBase + Guardrail data events
                  GuardDuty on CloudTrail
   Governance:    SCPs (model deny list, retention mode, global CRIS deny)
LayerControlReviewer question it answers
IdentityLeast-privilege role; model allow list; deny SCP for unapproved modelsWho can call which model?
NetworkInterface endpoints with private DNS and endpoint policies; no NAT for Bedrock trafficDoes traffic touch the internet?
Content safetyGuardrail version enforced with bedrock:GuardrailIdentifierCan a caller skip safety checks?
Data at restCustomer managed keys for knowledge base, store, logs, guardrail, sessionsWho can decrypt our data?
RetentionAccount retention mode set and enforced by SCPAre prompts stored, and by whom?
ResidencyGeographic profiles only, destinations verified; global profiles deniedWhere is a request processed?
AuditInvocation logging, CloudTrail data events, GuardDutyCan we prove who asked what?

Rollout checklist

  1. Pick the Region and list the models and inference profiles you will allow; verify destinations with GetInferenceProfile.
  2. Set the data retention mode and enforce it with an SCP.
  3. Create interface endpoints for bedrock-runtime and, if you use RAG, bedrock-agent-runtime; enable private DNS; attach endpoint policies.
  4. Write least-privilege roles and deny policies; test them with the IAM policy simulator.
  5. Create KMS keys and apply them to knowledge bases, guardrails, log buckets and sessions.
  6. Enable invocation logging with restricted access and log data protection.
  7. Enable CloudTrail data events for knowledge bases and guardrails; enable GuardDuty.
  8. Version and enforce a guardrail.

Security design questions feature in senior interviews; our Bedrock interview questions, AgentCore interview questions and the AWS interview questions hub are good next reads. For safety design beyond AWS, see AI guardrails explained.

Practise this at Cloud Soft Solutions

In the hands-on labs of our AI, GenAI and Agentic AI course you build this architecture step by step: VPC endpoints, scoped IAM roles, KMS keys, invocation logging and CloudTrail data events around a working Bedrock application. Our AWS training in Hyderabad covers the underlying VPC, IAM and KMS foundations. Join in the classroom in Ameerpet or online.

Sources

📞 Call +91 96660 19191 · +91 99496 16388 · WhatsApp
Cloud Soft Solutions, 513, 5th Floor, Aditya Enclave, Nilagiri Block, beside Ameerpet Metro Station, Ameerpet, Hyderabad 500016, Telangana, India

Frequently Asked Questions

Which VPC endpoints does Amazon Bedrock support?
Interface endpoints for bedrock (control plane), bedrock-runtime, bedrock-agent, bedrock-agent-runtime and bedrock-mantle, plus FIPS endpoints bedrock-fips and bedrock-runtime-fips in selected US, Canada and GovCloud Regions.

Is model invocation logging enabled by default?
No. It is disabled by default and is configured per account and Region, with CloudWatch Logs, Amazon S3 or both as destinations in the same account and Region. It covers Converse, ConverseStream, InvokeModel and InvokeModelWithResponseStream on the bedrock-runtime endpoint.

Are InvokeModel and Converse calls logged in CloudTrail?
Yes, as management events, which CloudTrail logs by default. Retrieve, RetrieveAndGenerate, ApplyGuardrail and agent invocations are data events that you must enable with advanced event selectors.

Does geographic cross-Region inference keep data in one country?
It keeps requests within the profile's geography, but prompts and outputs can move outside your source Region, and data stored for abuse detection is stored in the destination Region. AWS advises calling GetInferenceProfile from each source Region to verify every destination Region.

Do model providers see prompts sent to Amazon Bedrock?
AWS states that models run in Model Deployment Accounts operated by the Bedrock team, that providers have no access to those accounts, and that Bedrock does not share your content with model providers under any current data retention mode.

How do I block a foundation model across an AWS organization?
Deny bedrock:InvokeModel, bedrock:InvokeModelWithResponseStream and bedrock:CreateModelInvocationJob on the model's foundation-model ARN in an SCP or IAM policy. Denying aws-marketplace:Subscribe alone does not block the first invocation.

Share𝕏inf✉
EnrollWhatsAppCall us