All guides
Practice now
D5 · Security, compliance, and governance

Governance, compliance, and data security

Five services cover most AI governance questions on the AIF-C01: who can access, how data is encrypted, who did what, what sensitive data exists, and what threats are detected against the infrastructure that supports the models.

Summary table — Governance services for AI

ServiceMain functionRole in an AI context
Access control and identityWho can invoke models, create endpoints, or access training datasets.
Encryption key managementEncrypts training data, model artifacts, and data in transit to the model.
API call auditingRecords who invoked which model, when, and with what result.
PII discovery and classificationFinds sensitive data in S3 before using it to train or give context to a model.
ML-powered threat detectionProtects the infrastructure (accounts, network) that supports ML workloads.
Continuous configuration auditingEvaluates whether the resources supporting your AI workloads (buckets, roles, endpoints) meet configuration rules.
Amazon InspectorAutomatic vulnerability scanningDetects software and network vulnerabilities in the infrastructure that deploys your ML workloads.
AWS Audit ManagerAudit evidence automationContinuously collects evidence to demonstrate regulatory compliance for your AI services.
AWS ArtifactCompliance reports portalAccess to AWS audit reports and agreements (needed to demonstrate compliance to third parties).
Automated recommendationsIncludes security checks (for example, overly open permissions) relevant to AI environments.

AWS IAM — who can invoke models

Icon-Architecture/48/Arch_AWS-Identity-and-Access-Management_48

Controls access to AI services at the identity and permission level

In an AI context, IAM decides who can invoke a model in Bedrock, who can create or delete a SageMaker endpoint, and who can read training data stored in S3.

Typical use cases

  • • Restricting which applications can invoke Bedrock
  • • Separating permissions between whoever trains and whoever deploys a model
  • • Preventing a junior developer from deleting a production endpoint

Key principle

  • • Least privilege: every role only has the permissions it needs
  • • IAM controls access to AI services — it doesn't filter the content of responses (that's Guardrails)
Related labD5 · Security and Governance

Spot the bug: over-permissive IAM role for Bedrock

A role used by a chat app has excessive permissions over Bedrock. Find and fix the responsible statement — no guided steps.

Diagnose an IAM role with excessive privileges over Bedrock
Apply the principle of least privilege to generative AI workloads

+1 more...

6 min2 steps

AWS KMS — encrypting data and artifacts

Icon-Architecture/48/Arch_AWS-Key-Management-Service_48

Manages the keys that encrypt training data and models

KMS encrypts training datasets stored in S3, model artifacts (trained weights), and data in transit to and from an inference endpoint — just like it encrypts any other data on AWS.

  • • Customer Managed Keys (CMK): you control the key's rotation and policy
  • • Integrated with S3 (where training datasets typically live) and SageMaker
  • • Auditable: every use of a key is recorded in CloudTrail

AWS CloudTrail — auditing calls to AI services

Icon-Architecture/48/Arch_AWS-CloudTrail_48

Logs every invocation to Bedrock, SageMaker, and other AI services

CloudTrail answers "who invoked which model, when, and with what result?" — essential for compliance audits and for investigating an incident (for example, misuse of a model).

  • • Logs Bedrock API invocations, creation/deletion of SageMaker endpoints
  • • Doesn't record the detailed prompt content by default — its focus is "who made which call", not the generated content
  • • It's the evidence base for HIPAA, PCI DSS, or SOC 2 audits over AI usage
Related labD5 · Security, Compliance, and Governance

Audit Bedrock usage with CloudTrail

Enable a CloudTrail trail to audit who is invoking which Bedrock and SageMaker models, and from where.

Understand why auditing model calls is part of AI governance
Create a trail to log Bedrock and SageMaker API activity

+1 more...

8 min6 steps

Amazon Macie — discovering PII before using it

Icon-Architecture/48/Arch_Amazon-Macie_48

Automatically classifies sensitive data in S3 with machine learning

Before using a dataset to train or connecting it as a context source for RAG, Macie can scan the S3 bucket and alert if it contains personal data (names, credit cards, IDs) that should be anonymized first.

For the exam: if the scenario mentions "verify sensitive data before training a model" or "PII in S3", the answer is Macie — not Comprehend (which analyzes text for sentiment/entities in general) nor GuardDuty (which detects threats, not content classification).

Amazon GuardDuty — protecting the ML infrastructure

Icon-Architecture/48/Arch_Amazon-GuardDuty_48

Threat detection for the accounts and network supporting your AI workloads

GuardDuty doesn't analyze models or prompts — it monitors anomalous behavior in the AWS account where your ML workloads run: access from malicious IPs, crypto-mining activity on instances that should be training models, or unusual API calls against your SageMaker resources. Its role is to protect the infrastructure around the ML pipeline, complementing IAM, KMS, and CloudTrail.

AWS Config, Inspector, Audit Manager, Artifact, and Trusted Advisor

Five additional services the official guide explicitly names for governance and compliance of AI workloads — each covering a different part of the audit cycle.

Icon-Architecture/48/Arch_AWS-Config_48

Continuously evaluates and audits your AWS resources' configuration against compliance rules — for example, "do all buckets with training datasets have encryption enabled?". It also records the configuration change history.

Icon-Architecture/48/Arch_Amazon-Inspector_48

Amazon Inspector

Automatically scans workloads (EC2 instances, container images, Lambda functions) for software vulnerabilities and unintended network exposure — relevant for the infrastructure that deploys inference endpoints.

Icon-Architecture/48/Arch_AWS-Audit-Manager_48

AWS Audit Manager

Automates continuous evidence collection (configurations, logs, policies) to simplify compliance audits against frameworks like ISO 27001, PCI DSS, or internal frameworks.

Icon-Architecture/48/Arch_AWS-Artifact_48

AWS Artifact

Self-service portal to access AWS compliance reports (SOC, ISO, PCI DSS) and agreements like the BAA (HIPAA) — the source for demonstrating to an external auditor what AWS certifies.

Icon-Architecture/48/Arch_AWS-Trusted-Advisor_48

Offers automated recommendations across several categories, including security — for example, IAM roles with excessive permissions or buckets with overly open access — checks that apply equally well to resources supporting AI workloads.

How to tell them apart on the exam

Config audits "resource configuration". Inspector looks for "vulnerabilities". Audit Manager collects "audit evidence". Artifact delivers "AWS's existing compliance reports and agreements". Trusted Advisor gives "general recommendations" (not just security). If the scenario mentions one of these four terms almost verbatim, that's the hint toward the right service.

Related labD5 · Security and Governance

Gather compliance evidence with AWS Audit Manager

Create a compliance assessment for a generative AI governance framework and gather evidence automatically.

Understand what Audit Manager automates in an audit process
Configure an assessment against a control framework

+1 more...

9 min6 steps

An AWS framework that helps classify a GenAI use case into one of 5 "scopes" (categories) based on how much control you have over the model — from consuming a third-party application to training your own model from scratch. The scope determines which security and governance controls fall to you versus what the provider already covers.

Scope 1

Consuming a third-party SaaS application that uses GenAI internally — minimal control, almost all responsibility is the provider's

Scope 2

Building on top of a third-party application (e.g. a plugin or integration) — a bit more control and responsibility

Scope 3

Building your application using a pre-trained foundation model via API (e.g. Bedrock) — you control prompts, data, and guardrails

Scope 4

Fine-tuning an existing foundation model with your own data — more control, more responsibility over that data

Scope 5

Training your own model from scratch — maximum control and responsibility over the entire model lifecycle

The higher the scope (more control over the model), the greater the security and governance responsibility that falls on you — the same principle as the shared responsibility model, applied specifically to generative AI.

Related labD5 · Security and Governance

Challenge: classify the workload on the Generative AI Security Scoping Matrix

No guided steps: read a scenario and classify it into the correct scope of AWS's Generative AI Security Scoping Matrix.

Understand the 5 scopes of the Generative AI Security Scoping Matrix
Recognize when a workload is just "consuming" a third-party app

+1 more...

4 min1 steps

Governance checklist before production

Before taking an AI use case to production, check these five points.

1

Classify data sensitivity

Use Amazon Macie to discover whether your training or context data contains PII, and decide whether it needs to be anonymized.

2

Define who can access

Configure least-privilege IAM roles: who can invoke the model, who can deploy changes, who can read the data.

3

Configure Guardrails

Define harmful content filters, denied topics, and PII masking in the model's responses, appropriate to your use case.

4

Enable auditing

Turn on CloudTrail to log every invocation to AI services, and consider GuardDuty to monitor the underlying infrastructure.

5

Document the model with Model Cards

Record the purpose, training data, known limitations, and per-subgroup metrics before exposing the model to real users.

6

Define data residency

Decide in which region or country training and inference data is stored and processed — along with lifecycle, logging, monitoring, and retention policies, it's a central piece of data governance, especially if you operate under regulations requiring data not to leave a specific jurisdiction.

Did you get this topic?

Test what you just learned

Before connecting an S3 bucket as a source for a Bedrock RAG Knowledge Base, the security team wants to confirm the bucket does not contain personal ID numbers or credit card numbers. Which AWS service is best suited for this check?

Ready to test "Governance, compliance, and data security"?

Put what you learned to the test with original AIF-C01 exam questions.

Start AIF-C01 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.