AI Safety, Security, and Governance · Topic 4 of 7

Protected AI Environments

Secure FM deployments with Bedrock VPC endpoints, least-privilege IAM, Lake Formation fine-grained access and CloudWatch monitoring of data access.

  • 5 min
  • Includes a diagram
In a nutshell
  • Interface VPC endpoints (PrivateLink) keep Bedrock traffic private; endpoint policies restrict what passes through.
  • aws:SourceVpce conditions deny calls that bypass the endpoint.
  • bedrock:GuardrailIdentifier in IAM forces a guardrail on inference calls.

What it is

A protected AI environment keeps model traffic off the public internet, lets each identity reach only the models and data it needs, and records every access. It is ordinary AWS security applied to a new set of resources: models, guardrails, knowledge bases, agents and the data behind them.

The exam usually gives you a regulated workload (healthcare, finance, government) and asks for the control that closes a specific gap with the least change.

Appprivate subnetinterface endpointAWS PrivateLinkbedrock runtimeIAM checkedAmazon Bedrockmodel and guardrailAppreadsData lakeLake Formation permissionsloggedCloudTrail and CloudWatchaudit

How it works

Network isolation with VPC endpoints

Private access to Bedrock: an application in a private subnet with no internet or NAT gateway calls Bedrock through interface VPC endpoints (PrivateLink) with an endpoint policy, reaches S3 through a gateway endpoint, and an aws:SourceVpce condition denies calls from outside the endpoint. Amazon Bedrock supports interface VPC endpoints powered by AWS PrivateLink. Applications in private subnets call Bedrock without an internet gateway or NAT gateway, and traffic stays on the AWS network.

Endpoint serviceUsed for
bedrock-runtimeInvokeModel, Converse and other inference calls
bedrock-agent-runtimeInvokeAgent, Retrieve, RetrieveAndGenerate
bedrockControl plane, such as creating guardrails or jobs
bedrock-agentBuilding agents and knowledge bases
  • Attach an endpoint policy to limit which principals, actions and models may be used through the endpoint.
  • Use the aws:SourceVpce or aws:SourceVpc condition keys in IAM or resource policies to deny calls that do not come through your endpoint.
  • Use gateway endpoints for Amazon S3 so knowledge base source data and logs also stay private.
Exam tip

"Traffic must not traverse the public internet" points to interface VPC endpoints. A NAT gateway still sends traffic to the public service endpoint.

Least-privilege IAM

IAM controls who can call which model and with what settings.

  • Scope bedrock:InvokeModel to specific model ARNs or inference profile ARNs, not *.
  • Use the bedrock:GuardrailIdentifier condition key to require a specific guardrail on inference calls, so no application can skip it.
  • Give agents and knowledge bases their own service roles with access only to their S3 buckets, vector stores and Lambda functions.
  • Use service control policies in AWS Organizations to deny unapproved models or Regions across all accounts.
  • Encrypt knowledge base data, guardrails, agent resources and custom models with customer managed AWS KMS keys when you must control and audit key use.
Developer roleInvokeModelIAM policymodel ARN and guardrail conditionallowApproved modelDeveloper roleInvokeModel without guardrailIAM policydenyRequest rejected

Granular data access with AWS Lake Formation

When FM applications read from a data lake, AWS Lake Formation gives fine-grained permissions on AWS Glue Data Catalog tables.

NeedLake Formation feature
Hide sensitive columns such as SSNColumn-level permissions
Show only rows for one region or tenantRow-level security with data filters
Combine bothCell-level security
Scale permissions across many tablesLF-Tags (tag-based access control)

A RAG ingestion job or a text to SQL agent should run under a role that sees only the columns and rows it needs. If the role cannot read a column, the model can never leak it.

Monitoring data access

  • AWS CloudTrail records Bedrock API calls: who called which operation, when and from where. Some Bedrock runtime operations, such as agent and knowledge base calls, are recorded as data events, which you must enable on the trail.
  • Model invocation logging sends prompts and responses to Amazon CloudWatch Logs or S3. It is off until you turn it on.
  • CloudWatch metrics and alarms catch unusual patterns, such as a spike in invocations from one role or calls at odd hours.
  • CloudWatch Logs Insights queries the logs during an investigation; metric filters turn log patterns into alarms.
  • Lake Formation and S3 access appear in CloudTrail, so one trail shows both the model call and the data it touched.

Common mistakes

Using a NAT gateway for "private" access. It hides the instances but traffic still goes to the public endpoint. Use an interface endpoint for Bedrock.

Granting bedrock:* on *. Any model, any action, no guardrail enforcement. Scope actions and resources and add condition keys.

Securing the model but not the data. A text to SQL agent with full database rights can return any row. Restrict data at the source with Lake Formation or database permissions.

Confusing CloudTrail with invocation logging. CloudTrail shows that a call happened. Only model invocation logging captures the prompt and response text.

What to remember for the exam

  • Interface VPC endpoints (PrivateLink) keep Bedrock traffic private; endpoint policies restrict what passes through.
  • aws:SourceVpce conditions deny calls that bypass the endpoint.
  • bedrock:GuardrailIdentifier in IAM forces a guardrail on inference calls.
  • Lake Formation gives column, row and cell-level permissions and LF-Tags for scale.
  • CloudTrail records API activity; model invocation logging records prompt and response content.
  • Customer managed KMS keys give control and an audit trail for encryption of Bedrock resources.

Check yourself

  • A hospital app in private subnets must call Amazon Bedrock without internet access. What do you add?

    An interface VPC endpoint for the Bedrock runtime service, with an endpoint policy limiting the allowed actions and models.

  • How can a central security team make sure every inference call uses the approved guardrail?

    Add an IAM or SCP condition on the bedrock:GuardrailIdentifier key that denies inference calls without the approved guardrail.

  • A RAG ingestion role must not read the salary column of an HR table. Which service enforces this?

    AWS Lake Formation with column-level permissions on the Glue Data Catalog table.

Topic 4 of 7 in AI Safety, Security, and Governance

Test yourself on AI Safety, Security, and Governance

The full AWS AIP-C01 question bank has 827 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.