Security, compliance and governance for AI solutions on AWS
How to secure an AI system on AWS and prove it: the shared responsibility model as it shifts from Bedrock to SageMaker to EC2, IAM roles and policies, KMS encryption, PrivateLink and VPC isolation, Macie and the threat-detection services, the attacks that target models and LLM applications, data lineage and privacy-enhancing techniques, the standards a regulator will ask about, the services that collect the evidence, and the Generative AI Security Scoping Matrix that decides how much of all this is yours to do.
On this page
An AI system is an ordinary cloud application with three unusual assets inside it: a training dataset that may contain the most sensitive records the company holds, a model that encodes them and can be stolen or coaxed into revealing them, and a prompt channel that lets untrusted text drive privileged actions. Securing it means the usual AWS discipline (identity, encryption, network isolation, detection) plus controls for those three assets, and governing it means being able to show an auditor where the data came from, who could touch it, and which standard the whole thing was measured against. This article is Domain 5 of the exam, fourteen percent of the questions, and it is the domain with the most service names per page; the tables are the point. It leans on the responsible AI article for bias and transparency, on the Bedrock article for Guardrails, and on the prompt engineering article for the mechanics of prompt injection.
The map
Read this first when short on time. Every branch is a section below.
Shared responsibility: what AWS secures and what you secure, for Bedrock, SageMaker and EC2
The AWS shared responsibility model says AWS is responsible for security of the cloud (the facilities, hardware, network and the managed service software) and the customer is responsible for security in the cloud (data, identities, configuration, and whatever software the customer runs), and for AI the line moves depending on how much of the stack is managed.
Three ways to run a model on AWS put the line in three different places:
| Layer | Amazon Bedrock (managed FM API) | Amazon SageMaker AI (managed ML platform) | Self-hosted on Amazon EC2 |
|---|---|---|---|
| Physical, hardware, network fabric | AWS | AWS | AWS |
| Hypervisor and hosts | AWS | AWS | AWS |
| Operating system and patching | AWS | AWS (managed instances) | Customer |
| Model server and framework | AWS | Customer chooses the container; AWS maintains built-in images | Customer |
| Model weights | AWS and the provider; customer's fine-tuned copy is private to the account | Customer (trained or imported) | Customer |
| Network placement | AWS endpoint; customer adds PrivateLink | Customer (VPC config, isolation flags) | Customer (VPC, security groups, everything) |
| Identity and access | Customer (IAM) | Customer (IAM, execution roles) | Customer (IAM plus OS users) |
| Data, prompts, training sets | Customer | Customer | Customer |
| Encryption key management | AWS keys by default; customer may bring CMKs | Customer chooses keys | Customer entirely |
| Output safety | Customer (Guardrails, review) | Customer | Customer |
| Logging and audit | Customer turns on invocation logging and CloudTrail | Customer | Customer down to OS logs |
flowchart TD A["Always AWS<br/>regions, hardware, network, hypervisor"] B["Bedrock adds to AWS's side<br/>OS, model server, model weights, scaling, patching"] S["SageMaker adds to AWS's side<br/>OS and instance lifecycle only"] E["EC2 adds nothing<br/>customer owns OS, drivers, model server, weights"] C["Always the customer<br/>IAM, data, prompts, keys, guardrails, logging, compliance evidence"] A --> B --> C A --> S --> C A --> E --> C
Two Bedrock facts sit at the heart of many questions. First, Bedrock does not use customer prompts, completions or fine-tuning data to train the base models, and does not share them with the model providers; a customised model is a private copy in the customer's account. Second, Bedrock does not store prompts and completions unless the customer turns on model invocation logging, so the customer decides where (S3, CloudWatch Logs) and for how long that record exists. The responsibility for what the model is asked and what it says is entirely the customer's, which is why Guardrails and human review appear on the customer side of every column.
- Amazon Bedrock publishes its data-handling commitments in the service documentation: no training on customer content, no sharing with providers, encryption at rest and in transit, and invocation logging as an opt-in, which is the paragraph enterprise security reviews quote.
- Amazon SageMaker AI exposes the customer's share as flags:
EnableNetworkIsolationstops a training or inference container from making any outbound call,VolumeKmsKeyIdpicks the key for attached storage, and inter-container traffic encryption protects distributed training traffic. - EC2 with a GPU instance running an open-weight model gives complete control and complete responsibility: the customer patches the driver stack, hardens the model-serving software, and builds their own logging and rate limiting.
"Which of these is AWS's responsibility when using Bedrock" is answered by the infrastructure and the model hosting; "which is the customer's" is IAM, data, prompts, guardrails, logging. Moving from Bedrock to SageMaker to EC2 shifts operating system and software responsibility to the customer. Whatever the service, data classification and access control are never AWS's job.
- security of the cloud
- What AWS protects: physical sites, hardware, the network, virtualisation, and the software of managed services.
- security in the cloud
- What the customer protects: data, identities and permissions, configuration, guest operating systems where they own them, and application code.
- customised model
- In Bedrock, a fine-tuned or continued-pre-training copy of a foundation model, stored encrypted in the customer's account and never visible to other customers or the provider.
Identity and access: IAM roles, policies and least privilege for AI workloads
AWS Identity and Access Management (IAM) decides which principal may call which API on which resource, and for AI systems the practical questions are which role a training job or an endpoint runs as, who may invoke which model, and how to make both as narrow as possible.
The pieces
A principal is an identity making a request: an IAM user, a federated person, or a role assumed temporarily by a person or a service. A policy is a JSON document of allow and deny statements on actions, resources and conditions. Everything is denied unless a policy allows it, and an explicit deny beats any allow. Least privilege is the rule that a principal gets only the actions and resources it needs, for only as long as it needs them, and it is the phrase the exam uses to mark the correct answer.
| Policy type | Attached to | Answers the question | AI example |
|---|---|---|---|
| Identity-based | A user, group or role | What may this principal do? | A data scientist's role may call sagemaker:CreateTrainingJob and bedrock:InvokeModel on two named models. |
| Resource-based | A resource: S3 bucket, KMS key, Lambda function, VPC endpoint | Who may act on this resource? | A bucket policy that lets only the SageMaker execution role read the training set; a KMS key policy that lets only that role decrypt. |
| Permissions boundary | A user or role | What is the maximum this principal could ever be allowed? | Lets a team create roles for their pipelines without granting more than the boundary permits. |
| Service control policy (SCP) | An AWS Organizations account or organisational unit | What is the ceiling for every principal in these accounts? | Deny bedrock:* outside approved regions; deny model IDs not on the approved list. |
| Session policy | A role session | Narrow this assumption further | A shared application role scoped per tenant at assume time. |
The roles an AI application actually uses
- SageMaker execution role. Every notebook, training job, processing job, pipeline and endpoint runs as a role you hand to SageMaker. It needs read on the training data, write on the output location, pull on the container image, and use of the KMS key; it does not need
AmazonSageMakerFullAccess, which is the managed policy people attach in a hurry and auditors find later. - Bedrock invocation. The application's role gets
bedrock:InvokeModelandbedrock:InvokeModelWithResponseStreamon specific foundation-model ARNs (and on an inference profile if cross-region inference is used). Model access is enabled per account and per region, and IAM condition keys can require that a named guardrail be applied to every call, so the policy itself enforces the safety layer. - Agent and knowledge base roles. A Bedrock agent runs as a role that may invoke its model and its action-group Lambda functions and nothing else; a knowledge base's role may read its S3 source and write to its vector store. Excessive agency, one of the LLM threats below, is prevented mostly by keeping these roles small.
- People. Humans should come through AWS IAM Identity Center (the successor to AWS SSO): workforce identities from the corporate directory, permission sets mapped to roles, and short-lived sessions. SageMaker Studio domains and Amazon Q Business both authenticate users through it, so a leaver disabled in the directory loses the notebook and the assistant at once.
flowchart TD P["Person via IAM Identity Center<br/>permission set, short-lived session"] S["SageMaker Studio and jobs<br/>run as the execution role"] D["Training data bucket<br/>bucket policy allows only that role"] K["KMS customer managed key<br/>key policy allows only that role"] A["Application role<br/>InvokeModel on two model ARNs, guardrail required"] B["Amazon Bedrock<br/>model access enabled in this region"] P --> S S --> D S --> K A --> B P -. "deploys" .-> A
Both sides must agree. A role with s3:GetObject on the bucket still fails if the bucket policy or the KMS key policy does not name it, and a bucket policy that allows the role still fails if the role's identity policy lacks the action. Cross-account access always needs the resource-based half; that is the usual cause of "AccessDenied" on a training job reading another team's data.
- Amazon SageMaker Studio in a regulated bank is typically set up with Identity Center authentication, one execution role per team, and a permissions boundary that stops any team's pipeline role from reaching another team's buckets.
- AWS Organizations SCPs are how a company keeps every account to an approved model list and approved regions for Bedrock, so no developer can invoke a model the legal team has not reviewed, whatever their own account permissions say.
- Amazon Q Business uses Identity Center identities to filter retrieval by document ACLs, so a generative answer only ever draws on documents the asking user could already open.
"Least privilege" and "grant only the permissions needed" mark the answer that names specific actions and resources over a managed full-access policy. "Which role does a training job use" is the SageMaker execution role. "Restrict which models can be invoked across all accounts" is an SCP. "Allow another account's role to read the bucket" needs a resource-based (bucket) policy. "Manage workforce sign-in to Studio" is IAM Identity Center.
- role
- An IAM identity with permissions but no long-term credentials; a person or a service assumes it and receives short-lived keys.
- execution role
- The role SageMaker assumes on your behalf to run a job or an endpoint. Its permissions are the job's permissions.
- SCP
- Service control policy: an AWS Organizations policy that caps what any principal in an account may do. It grants nothing by itself; it only limits.
Encryption: KMS, customer managed keys, at rest and in transit
Encryption at rest protects stored data (buckets, volumes, model artefacts, vector stores) with keys managed in AWS Key Management Service (KMS), and encryption in transit protects data moving between components with TLS; on AWS the first is a configuration choice per resource and the second is the default on every service API.
Keys and who holds them
KMS offers three tiers of key. AWS owned keys belong to the service and are invisible to you; many services use them by default. AWS managed keys (aws/s3, aws/sagemaker) live in your account, are used automatically by the service, and show up in CloudTrail, but you cannot change their policy. Customer managed keys (CMKs) are created by you: you write the key policy, control grants, enable rotation, can disable or schedule deletion, and every use is a CloudTrail event naming the caller. Regulated workloads use CMKs because "we can revoke access to the data by disabling the key" is a control an auditor understands, and because the key policy is a second lock, independent of IAM, on the data it protects.
| Where the data sits | Encryption option | Note |
|---|---|---|
| S3 (training sets, model artefacts, invocation logs) | SSE-S3 (S3-managed keys, the default), SSE-KMS (KMS key, AWS managed or CMK), SSE-C (you supply the key on every request), or client-side encryption before upload | SSE-KMS with a CMK plus a bucket policy that denies unencrypted uploads is the usual regulated pattern. |
| SageMaker notebooks, training and inference volumes | EBS volumes encrypted with a KMS key you name (VolumeKmsKeyId) | Output to S3 uses a separate output key setting. |
| SageMaker distributed training traffic | Inter-container traffic encryption | Adds latency; required in some regulated set-ups. |
| Bedrock customised models, agents, knowledge bases, guardrails | AWS owned key by default, or a CMK you specify | Fine-tuning jobs read your S3 data through your role and write the encrypted custom model. |
| Vector stores (OpenSearch Serverless, Aurora, and so on) | Service encryption at rest with AWS owned or customer managed keys | Embeddings are derived data; they are still sensitive. |
| Secrets (third-party API keys, database passwords) | AWS Secrets Manager, encrypted with KMS, rotated on a schedule | Never in a prompt template, environment variable or notebook cell. |
| Everything on the wire | TLS on every AWS API endpoint; HTTPS between the app tiers | PrivateLink keeps the TLS traffic on the AWS network too. |
- Banks running SageMaker hold their own CMKs for every training bucket and volume, with key policies that name the execution roles, so a leaked credential with wide S3 permissions still cannot read the data.
- Amazon Bedrock Knowledge Bases can encrypt the data source transit, the vector store and the ingestion jobs with a customer managed key, and the same key's CloudTrail record shows every decrypt.
- AWS Secrets Manager holds the keys for third-party model APIs and SaaS connectors that agents call, rotating them on a schedule so a leaked key ages out.
Encryption at rest does nothing against a principal who is allowed to read. If the application role can decrypt, so can anyone who compromises the application. Encryption is a control against lost disks, mis-shared buckets and cross-tenant leaks, and a lever for revocation; access control is still the primary defence, and the two are configured separately.
"Control and audit the keys", "rotate", "revoke access to data", "meet a requirement to manage our own keys" all point at a customer managed KMS key. "Encrypt data in transit" is TLS (and PrivateLink if the question adds "without traversing the internet"). "Store credentials securely" is AWS Secrets Manager. SSE-S3 is the default and fine when no key-control requirement is stated.
- CMK
- Customer managed key in KMS: created, governed and audited by the customer, usable by services only through its key policy and grants.
- envelope encryption
- Data is encrypted with a data key, and the data key is encrypted with the KMS key. KMS never sees the data; the service never stores the plaintext data key.
- SSE
- Server-side encryption: S3 encrypts the object when it is written and decrypts it when it is read, using S3 keys (SSE-S3), KMS keys (SSE-KMS) or a key you supply (SSE-C).
Network isolation: VPC, PrivateLink and the front door
Network isolation keeps the model, the data and the application on private addresses, reached only over paths you allow: a VPC with private subnets and security groups for what you host, interface VPC endpoints (AWS PrivateLink) for the managed services you call, and a hardened public entry point for the users.
Private paths to managed services
By default, a call to Bedrock or SageMaker goes to a public AWS endpoint over the internet (encrypted, but public). An interface VPC endpoint puts a private IP for the service inside your subnet, so the call stays on the AWS network; the endpoint's own policy can restrict which APIs and which resources may be reached through it, and the security group on it limits who in the VPC may use it. Bedrock has endpoints for the control plane (bedrock), the runtime (bedrock-runtime) and the agent runtime; SageMaker has them for the API, the runtime (invoking endpoints), Studio and the feature store. S3 gets a gateway endpoint. With those in place a workload in a subnet with no internet route can train, invoke models and read data.
SageMaker adds isolation of its own: a Studio domain or notebook can be created in VPC-only mode with direct internet access disabled, so all traffic flows through the endpoints; training and inference containers can run with network isolation, meaning no outbound network calls at all, which also guarantees an untrusted third-party container cannot exfiltrate data.
The front door
Users reach a generative AI application through an ordinary web front, and it is protected in the ordinary way: Amazon CloudFront or an Application Load Balancer, AWS WAF for request filtering and rate limiting (which is also the first line against prompt-flooding and unbounded consumption), AWS Shield for DDoS protection (Standard is automatic, Advanced is paid and adds response support), and Amazon API Gateway with authorisation (Cognito, IAM or a Lambda authoriser) in front of the Lambda or container that builds the prompt. Secrets the application needs come from Secrets Manager at run time.
flowchart TD U["Users"] W["CloudFront with WAF and Shield<br/>rules, rate limits, DDoS protection"] G["API Gateway<br/>authorisation, throttling"] L["Lambda in a private subnet<br/>application role, builds the prompt"] E["Interface VPC endpoint<br/>bedrock-runtime over PrivateLink"] B["Amazon Bedrock<br/>guardrail applied on every call"] K["KMS customer managed key<br/>knowledge base and logs"] T["CloudTrail and invocation logging<br/>who called, what was asked and answered"] S["Secrets Manager<br/>third-party keys at run time"] U --> W --> G --> L --> E --> B L --> S B --> K B --> T
- Banks and insurers on Bedrock almost always require the
bedrock-runtimeinterface endpoint, so that prompts containing customer data never traverse the public internet even encrypted, and an endpoint policy that lists the permitted model ARNs. - Amazon SageMaker Studio in VPC-only mode with no direct internet is the standard configuration in healthcare and financial services; package installs go through a private artefact repository or an approved proxy.
- AWS WAF rate-based rules in front of chat applications are the pragmatic defence against a single client burning the token budget, and against automated jailbreak attempts that need thousands of tries.
"Without traversing the public internet", "private connectivity" and "no internet gateway" point at AWS PrivateLink (interface VPC endpoints). "Prevent the training container from accessing the internet" is SageMaker network isolation. "Protect the web application from common exploits and bots" is AWS WAF; "protect against DDoS" is AWS Shield; "control inbound traffic to instances" is a security group.
- interface VPC endpoint
- An elastic network interface in your subnet with a private IP that fronts an AWS service through PrivateLink. Has its own security group and endpoint policy.
- gateway endpoint
- A route-table entry that sends S3 or DynamoDB traffic over the AWS network; no ENI, no charge.
- security group
- A stateful, instance-level firewall: allow rules only, applied to ENIs including endpoint ENIs.
Sensitive data: finding it, protecting it and engineering it securely
Secure data engineering for AI means knowing what sensitive data you hold before it reaches a model, reducing it with privacy-enhancing techniques, controlling who may read what at column and row level, checking its quality, and guaranteeing its integrity from source to training set.
Finding sensitive data
Amazon Macie is the discovery service for Amazon S3: it uses machine learning and pattern matching to find personally identifiable information (names, addresses, national IDs, card numbers), financial data, credentials and secrets in objects, runs one-off or scheduled discovery jobs or continuous automated sensitive data discovery across the account, and publishes findings to Security Hub and EventBridge. It is the answer for "which buckets contain PII" before a training set is assembled. Amazon Comprehend finds PII inside a piece of text (an API call on a document or a batch job over many), and can redact it; it is the answer for a text pipeline or a prompt. Guardrails for Amazon Bedrock handles PII in model traffic at inference. The three are often confused; the table under threat detection below settles the split.
Privacy-enhancing techniques
| Technique | What it does | Reversible? | Use it when | On AWS |
|---|---|---|---|---|
| Anonymisation | Removes or destroys identifiers so a record cannot be linked to a person. | No | The model does not need identity at all (most analytics and training). | Glue DataBrew transforms, Comprehend redaction, Glue jobs. |
| Pseudonymisation | Replaces identifiers with consistent stand-ins; a separate, protected mapping can restore them. | Yes, with the mapping | You need to join or follow a person across datasets without exposing who they are. | Hash or key-based replacement in Glue or DataBrew; mapping table in a locked-down store. |
| Tokenisation | Swaps a sensitive value (a card number) for a random token; a vault holds the mapping. | Yes, via the vault | Payment and account data that must round-trip to the source system. | Partner tokenisation services; DynamoDB or KMS-backed vault patterns. |
| Masking | Hides part of a value (****1234) or replaces it with a placeholder. | Usually no | Display, logs, prompts, test data. | DataBrew masking transforms; Comprehend redaction; Guardrails PII masking in responses. |
| Generalisation and k-anonymity | Coarsens values (age 34 becomes 30 to 39) until each combination is shared by at least k people. | No | Releasing aggregate datasets. | Glue or Athena transformations. |
| Differential privacy | Adds calibrated noise so that any single person's presence changes the output by a bounded, small amount. | No | Statistics and models trained on sensitive populations where membership must not be inferable. | Custom training code (for example DP-SGD in SageMaker); Clean Rooms differential privacy for queries. |
| Synthetic data | Generates artificial records with the statistical shape of the real ones. | Not applicable | Sharing with vendors, testing, augmenting rare classes. | Generative models on SageMaker or Bedrock; evaluate for leakage of real records. |
| Encryption | Protects data while stored or moved; does not reduce it. | Yes, with the key | Always, in addition to the above. | KMS as in the previous section. |
Anonymisation and pseudonymisation are the two the exam most often contrasts: anonymised data is no longer personal data under GDPR and falls outside it; pseudonymised data is still personal data, because the mapping exists, and stays regulated.
Access control on data
Three layers stack. IAM and S3 bucket policies decide who may read a bucket or prefix. AWS Lake Formation adds fine-grained permissions on catalogued tables: column-level (hide the salary column), row-level (a region's analysts see only their rows) and cell-level, granted to principals or through LF-tags on tables and columns, and enforced across Athena, Redshift Spectrum, EMR and Glue. Amazon DataZone sits above as a business catalogue where data owners publish data products and consumers subscribe with an approval step, so access is granted by a workflow rather than a ticket to an administrator.
Quality and integrity
Data quality assessment is a security practice as much as a modelling one, because poisoned or corrupted data is a security failure: AWS Glue Data Quality evaluates rules (completeness, uniqueness, ranges, freshness, custom SQL) on tables and pipelines and can stop a job that fails them; Glue DataBrew profiles a dataset visually; SageMaker Data Wrangler reports on a data flow. Data integrity is the guarantee that what was trained on is what was collected: S3 checksums (SHA-256, CRC and others computed on upload and verifiable on download), S3 versioning so an overwrite never destroys the original, S3 Object Lock for write-once-read-many immutability with governance or compliance mode and legal holds, and dataset versioning (a manifest, a hash, or a SageMaker Feature Store version) recorded in the model card.
- Amazon Macie automated discovery is turned on account-wide by companies that inherited thousands of buckets, and its sensitivity score per bucket decides which ones are even eligible to become training data.
- AWS Glue DataBrew has purpose-built PII transforms (detect, redact, hash, replace, substitute) that data engineers use to pseudonymise a customer table before a data scientist ever sees it.
- AWS Lake Formation row and column permissions are how one shared data lake serves both a marketing team that must not see health fields and a clinical team that must, without copying the data.
- S3 Object Lock in compliance mode is what regulated firms use for the frozen copy of a training set that produced a model in production, so that a later investigation can retrain and reproduce the result.
Embeddings and fine-tuned weights are derived from the data and can leak it: a vector store of customer emails is a database of customer emails in a different encoding, and a fine-tuned model can regurgitate training records. Anonymise or redact before embedding or training; masking the prompt afterwards does not un-train the model.
"Discover sensitive data in S3" is Amazon Macie. "Detect or redact PII in text" is Amazon Comprehend. "Mask PII in model responses" is Guardrails. "Column-level or row-level access to data in the lake" is Lake Formation. "Prevent objects from being deleted or changed" is S3 Object Lock. "Reversible replacement of identifiers" is pseudonymisation or tokenisation; "irreversible" is anonymisation. "Add noise so individuals cannot be identified" is differential privacy.
- PII
- Personally identifiable information: anything that identifies a person alone or in combination. Health data (PHI) and card data (PCI) are regulated subsets.
- WORM
- Write once, read many: storage that refuses modification or deletion for a retention period. S3 Object Lock implements it.
- LF-tag
- A Lake Formation tag attached to databases, tables or columns; permissions granted on the tag apply to everything carrying it.
Threat detection and vulnerability management around the AI stack
The detection services do for an AI application what they do for any other workload: GuardDuty watches for malicious activity, Inspector finds vulnerabilities in the software you run, Security Hub aggregates findings against standards, and WAF and Shield defend the edge; the AI-specific part is knowing which one covers which layer of the model pipeline.
| Service | Layer | What it does | AI-stack use | Exam keyword |
|---|---|---|---|---|
| Amazon GuardDuty | Threat detection | Analyses CloudTrail, VPC Flow Logs, DNS logs and optional protection plans (S3, EKS, RDS, Lambda, malware, runtime) with threat intelligence and anomaly detection. | Compromised credentials calling SageMaker or Bedrock unusually; data exfiltration from a training bucket; a notebook instance mining cryptocurrency. | "threat detection", "malicious activity", "compromised credentials" |
| Amazon Inspector | Vulnerability management | Scans EC2 instances, container images in Amazon ECR and Lambda functions for known CVEs and network reachability, continuously. | The inference container image, the custom training image, the Lambda that builds prompts; a self-hosted model server on EC2. | "vulnerabilities", "CVE", "software packages", "container images" |
| AWS Security Hub | Findings and posture | Aggregates findings from GuardDuty, Inspector, Macie, Config and partners; runs automated checks against standards (AWS Foundational Security Best Practices, CIS, PCI DSS, NIST). | One view of the AI account's posture; the SageMaker checks in the foundational standard (notebook internet access, encryption). | "central view", "security posture", "aggregate findings" |
| AWS WAF | Application (layer 7) | Rules on HTTP requests: managed rule groups for common exploits, bot control, rate-based rules, geo and IP rules. | Front of the chat application; rate limits against prompt flooding and automated jailbreak attempts. | "web exploits", "SQL injection", "rate limiting", "bots" |
| AWS Shield | Infrastructure (layers 3 and 4, plus 7 with Advanced) | DDoS protection; Standard is free and automatic, Advanced adds detection, mitigation, cost protection and a response team. | Keeping the public endpoint of the assistant up under volumetric attack. | "DDoS" |
| AWS Secrets Manager | Application secrets | Stores, encrypts, rotates and audits access to credentials and API keys. | Third-party model API keys, vector database passwords, connectors used by agents. | "rotate credentials", "store API keys" |
| Amazon CloudWatch | Monitoring | Metrics, logs, alarms and dashboards. | Invocation counts, latency, throttles, guardrail interventions, token usage per caller; anomaly alarms on spend. | "monitor", "alarm", "metrics" |
Two of these tend to be mixed up: Inspector finds weaknesses in software you deploy (a vulnerable library in the container), GuardDuty finds someone exploiting your account (an API call pattern that looks like an attacker). Config, which appears in the governance section, is a third thing again: it finds mis-configuration (an unencrypted endpoint). The three together are vulnerability, threat and configuration.
- Amazon Inspector scanning ECR is the standard gate on SageMaker inference images: a build pipeline that pushes a container with a critical CVE fails before the endpoint is updated.
- Amazon GuardDuty has findings for anomalous SageMaker API activity and for S3 exfiltration patterns, which is how a leaked access key used to download a training set from an unfamiliar network gets noticed.
- AWS Security Hub is where a company's security team sees the AI account beside every other account, with the same standards and the same severity scale, rather than as a special case.
Match the noun: "vulnerabilities in EC2, containers or Lambda" is Inspector; "malicious or unauthorised behaviour" is GuardDuty; "aggregate findings and check against standards" is Security Hub; "web application attacks" is WAF; "DDoS" is Shield; "sensitive data in S3" is Macie; "configuration compliance" is Config (next section). Distractors swap these nouns.
- CVE
- Common Vulnerabilities and Exposures: the public identifier for a known software vulnerability. Inspector reports them with a severity score.
- finding
- A single detected issue with a severity, a resource and a recommendation, in the common format Security Hub aggregates.
Threats specific to AI systems, and the OWASP Top 10 for LLM applications
Beyond ordinary application security, an AI system has attacks aimed at the training data, the model itself and the prompt channel, and the OWASP Top 10 for LLM Applications and MITRE ATLAS are the two catalogues that give them names.
Against the model and its data
| Threat | What the attacker does | Defence |
|---|---|---|
| Data poisoning | Inserts or alters training examples (or documents a RAG system will retrieve) so the model learns a backdoor or a bias. | Provenance and integrity of training data (checksums, Object Lock, catalogued sources), Glue Data Quality, review of crowd-sourced labels, curated knowledge-base sources. |
| Model theft / extraction | Steals the weights (exfiltration from S3 or a notebook) or reconstructs a copy by querying the endpoint many times and training on the answers. | Least-privilege roles and CMKs on artefacts, PrivateLink, rate limiting and quotas on the endpoint, watermarking, GuardDuty on exfiltration. |
| Membership inference | Determines from the model's confidence whether a particular record was in the training set: a privacy breach in itself. | Differential privacy, regularisation, not exposing raw confidence, aggregating outputs. |
| Model inversion | Reconstructs training inputs (a face, a record) from the model's outputs or gradients. | As above, plus limiting output detail and access to gradients. |
| Adversarial examples | Crafts inputs with small perturbations that flip the prediction. | Adversarial training, input validation, ensembles, robustness evaluation (Clarify, Bedrock evaluation). |
| Supply chain | Ships a malicious model file, dataset or dependency (a serialised model that runs code on load, a poisoned public dataset, a vulnerable library). | Trusted sources (JumpStart, Bedrock), safe serialisation formats, Inspector on images, signed artefacts, licence review. |
Against the application: the OWASP Top 10 for LLM applications
The OWASP Top 10 for Large Language Model Applications (2025 edition) lists the risks builders most often ship. Each pairs naturally with an AWS control:
- LLM01 Prompt injection. Untrusted text (a user message, or a document the model reads) alters the model's behaviour. Guardrails' prompt-attack filter, separating instructions from data, least-privilege tools. Detail in the prompt engineering article.
- LLM02 Sensitive information disclosure. The model reveals PII, secrets or proprietary data from its training set or context. Redact before training and retrieval; Guardrails sensitive-information filters; document-level access control in RAG.
- LLM03 Supply chain. Compromised models, datasets, plugins or libraries. Trusted sources, Inspector, provenance.
- LLM04 Data and model poisoning. As above.
- LLM05 Improper output handling. Model output is passed unchecked into a browser, a shell or a database (cross-site scripting or injection via the model). Treat output as untrusted input; encode, validate, parameterise.
- LLM06 Excessive agency. An agent has more tools, permissions or autonomy than the task needs and is talked into misusing them. Narrow action groups, narrow roles, confirmation for consequential actions, human approval steps.
- LLM07 System prompt leakage. The system prompt, and any secret in it, is extracted. Keep secrets out of prompts; assume the prompt is public; enforce rules in code, not only in the prompt.
- LLM08 Vector and embedding weaknesses. Poisoned or over-shared vector stores; embeddings inverted back to text. Access control on the store, per-document permissions, ingestion validation.
- LLM09 Misinformation. Hallucinated or wrong output relied on. Grounding, citations, contextual grounding checks, human review.
- LLM10 Unbounded consumption. Denial of service or denial of wallet through unlimited requests or tokens. WAF rate limits, API Gateway throttling, Bedrock quotas, per-caller token budgets, CloudWatch spend alarms.
MITRE ATLAS (Adversarial Threat Landscape for Artificial-Intelligence Systems) is the companion catalogue in the style of MITRE ATT&CK: a matrix of tactics and techniques used against machine learning systems, with real case studies, used by security teams to threat-model a model the way they already threat-model a network.
flowchart TD D["Training data and documents<br/>poisoning, supply chain"] M["Model and vector store<br/>theft, inversion, membership inference, embedding leaks"] P["Prompt channel<br/>injection, jailbreaks, system prompt leakage"] O["Output<br/>improper handling, sensitive disclosure, misinformation"] T["Tools and agents<br/>excessive agency"] R["Resources<br/>unbounded consumption"] D --> M --> P --> O --> T P --> R
- Guardrails for Amazon Bedrock includes a prompt-attack filter as one of its content-filter categories, tuned to detect jailbreak and injection attempts in user input, which is the managed answer to LLM01.
- Public model hubs have repeatedly hosted model files in serialisation formats that execute code on load; the industry's move to safer formats and to scanning uploads is the LLM03 lesson, and it is why enterprises prefer models delivered through Bedrock or JumpStart.
- Amazon Bedrock Agents encourage narrow action groups (one Lambda per capability, with its own role) and support requiring user confirmation before an action runs, which is how LLM06 is handled in practice.
The system prompt is not a security boundary. Anything a model is told can be leaked or overridden by a sufficiently clever input, so every rule that matters (which documents this user may see, which actions this agent may take, what data may leave) must be enforced by IAM, by retrieval filters and by code, with the prompt as a courtesy rather than a control.
"An attacker altered training data to change model behaviour" is data poisoning. "Determine whether a record was in the training set" is membership inference. "Reconstruct a copy of the model by querying it" is model extraction. "A user's input caused the model to ignore its instructions" is prompt injection, and the AWS mitigation is Guardrails. "The agent performed an action it should not have been able to" is excessive agency, fixed with least-privilege roles. The catalogues are the OWASP Top 10 for LLM applications and MITRE ATLAS.
- jailbreak
- A prompt designed to make the model drop its safety behaviour; a prompt injection aimed at the safety rules rather than the task.
- excessive agency
- An LLM-driven component with more permissions, tools or autonomy than its task requires, so that a manipulated model can do real damage.
- denial of wallet
- An attack that runs up the victim's bill (tokens, invocations) rather than taking the service down.
Knowing where data came from: lineage, catalogues and citations
Data lineage is the recorded path from a source system through every transformation to a training set, a model and a prediction, and it is what lets you answer "where did this come from" for a regulator, "what is affected" after a breach, and "which documents support this answer" for a user.
AWS splits the job across several services, each holding one kind of record:
- AWS Glue Data Catalog holds technical metadata: databases, tables, schemas, partitions and locations, populated by crawlers or by Glue jobs, and used by Athena, Redshift Spectrum, EMR and SageMaker. It is the inventory of what data exists and what shape it is in.
- Amazon DataZone is the business catalogue on top: data products with owners, descriptions, glossary terms and quality indicators, published into a domain, and subscribed to through an approval workflow. It records who asked for what data and who approved it.
- AWS Lake Formation governs permissions on the catalogued data and records grants; with the catalog it answers "who could read this table on this date".
- Amazon SageMaker ML Lineage Tracking records the graph of artefacts (datasets, images, models), actions (processing, training, deployment) and contexts (experiments, endpoints) as pipelines run, so a model version can be traced back to the exact dataset version and code that made it. SageMaker Feature Store versions features by time, so a training set can be reconstructed as of a date.
- SageMaker Model Cards summarise the lineage for people: training data sources, evaluation datasets, intended use, as the responsible AI article describes.
- Amazon Bedrock Knowledge Bases return citations, the retrieved passages and their source locations, with each answer, which is lineage at the level of a single generated response, and the reason a user can verify it.
flowchart TD S["Source systems<br/>databases, logs, documents, third-party data with licences"] I["Ingestion and transformation<br/>Glue jobs, DataBrew, quality rules, PII redaction"] C["Glue Data Catalog and DataZone<br/>schema, owner, terms, approvals, Lake Formation grants"] F["Feature Store or versioned S3 dataset<br/>checksums, Object Lock, point-in-time"] T["Training and evaluation<br/>ML Lineage Tracking records dataset, code, image"] R["Model Registry and Model Card<br/>version, approval, data sources, metrics"] E["Endpoint or Bedrock application<br/>invocation logs, citations back to sources"] S --> I --> C --> F --> T --> R --> E
Provenance also has a legal edge. Datasets and models come with licences (Creative Commons variants, research-only terms, model licences with acceptable-use clauses) and consent conditions; recording them in the catalogue at ingestion is what makes "may we fine-tune on this" answerable later. The same record is the mitigation for the intellectual-property risk in the previous article.
- Amazon DataZone is used by large enterprises to make every dataset a product with an owner, so a machine learning team requesting customer data goes through the owner's approval and the grant is logged, instead of a bucket being shared in a chat message.
- SageMaker Pipelines populate ML Lineage Tracking automatically, so a compliance team can pick a model in production and walk back to the processing job, its input manifest and the container image digest.
- Amazon Bedrock Knowledge Bases citations are what make a support assistant defensible: the answer links to the policy document version it came from, and the document's own lineage says who published it.
"Catalogue metadata about datasets" is the Glue Data Catalog; "business catalogue with data products, owners and subscription approval" is Amazon DataZone; "fine-grained permissions on lake data" is Lake Formation; "track the artefacts and steps that produced a model" is SageMaker ML Lineage Tracking; "show users the source of a generated answer" is Knowledge Base citations; "document the model's training data and intended use" is a Model Card.
- lineage
- The recorded chain of sources, transformations and consumers for a piece of data or a model.
- provenance
- Where data originally came from and under what terms: the source, the licence, the consent, the date.
- data product
- In DataZone, a published, owned, documented dataset that consumers subscribe to rather than copy.
Standards and laws: ISO, SOC, the EU AI Act, NIST and the sector rules
Compliance standards are the external yardsticks an AI system is measured against: management-system standards that certify how an organisation runs, audit reports that attest to controls, and laws that decide what an AI system may do and how it must be explained.
The exam does not test the clauses. It tests which named standard fits which sentence: an AI management system is ISO 42001, a security management system is ISO 27001, an auditor's report on controls is SOC 2, a law that tiers AI systems by risk is the EU AI Act, a voluntary framework for managing AI risk is the NIST AI RMF, and healthcare, payment and personal data have their own acronyms.
| Standard or law | What it is | What it asks of an AI system | Exam keyword |
|---|---|---|---|
| ISO/IEC 42001 | The first international management-system standard for AI, published in 2023 | A governed lifecycle for AI: risk assessment, impact assessment, roles, monitoring, continual improvement | "AI management system", "certify how we govern AI" |
| ISO/IEC 27001 | The information security management-system standard | Controls over confidentiality, integrity and availability of the data and systems the AI uses | "information security management" |
| SOC 1, 2, 3 | Auditor attestation reports (SOC 1 for financial reporting controls, SOC 2 for security, availability, processing integrity, confidentiality and privacy, SOC 3 a public summary) | Evidence that a provider's controls operate; AWS's own reports come from AWS Artifact | "auditor's report on the provider's controls" |
| EU AI Act | The European Union's AI law, applying by risk tier: unacceptable (banned), high risk (strict obligations), limited risk (transparency duties), minimal risk | Risk classification, documentation, human oversight, transparency to users, obligations on general-purpose model providers | "algorithm accountability law", "risk tiers" |
| NIST AI RMF | The United States' voluntary AI Risk Management Framework with four functions: govern, map, measure, manage | A structured, repeatable way to identify and reduce AI risk across the lifecycle | "framework for managing AI risk", "govern, map, measure, manage" |
| GDPR | The EU's data protection regulation | Lawful basis for processing personal data, data minimisation, rights of access and erasure, meaningful information about automated decisions, residency and transfer rules | "personal data of EU residents", "right to explanation" |
| HIPAA | The US health-information privacy law | Protected health information handled only in eligible services under a business associate agreement; Bedrock and SageMaker are HIPAA eligible | "patient data", "PHI" |
| PCI DSS | The payment card industry data security standard | Cardholder data isolated, encrypted, access-controlled and monitored | "card numbers" |
| CCPA | California's consumer privacy law | Disclosure of data collection and sale, opt-out and deletion rights | "California residents" |
Two ideas tie the list together. First, AWS's compliance covers the cloud: its ISO, SOC and PCI attestations say the infrastructure and the managed services meet the standard, and the customer still has to make what they build on top compliant, which is the shared responsibility model from the top of this article again. Second, "algorithm accountability laws" is the exam guide's umbrella term for laws such as the EU AI Act and municipal rules that require organisations to assess, document and explain automated decisions, and in a question that phrase points at documentation tools: Model Cards, impact assessments, audit trails.
"Which standard certifies an AI management system" is ISO 42001, and AWS has announced that certification for services including Bedrock and SageMaker. "Which report can we give an auditor about AWS itself" is a SOC report from AWS Artifact. "A law that classifies AI systems by risk" is the EU AI Act. "A voluntary framework" is NIST AI RMF. None of these are AWS services; the AWS services that help meet them are in the next section.
- AWS holds ISO/IEC 42001 certification for its generative AI services, and publishes the certificate and its SOC reports through AWS Artifact for customers' auditors.
- Amazon Bedrock is HIPAA eligible, which is why healthcare customers can run clinical-note summarisation on it under a business associate agreement.
- Banks in the EU map their model-risk processes onto the EU AI Act's high-risk tier for credit scoring, which is where documentation duties are heaviest.
- management-system standard
- A standard, such as ISO 27001 or 42001, that certifies how an organisation governs a subject rather than a single product.
- attestation report
- An independent auditor's report, such as SOC 2, that controls were designed and operated as described.
- business associate agreement
- The HIPAA contract under which a cloud provider may handle protected health information for a covered entity.
Governance services: Config, Inspector, Audit Manager, Artifact, CloudTrail and Trusted Advisor told apart
Six AWS services carry the governance and compliance load on the exam, and every question about them comes down to matching a verb (record, scan, collect, hand over, log, advise) to the right name.
flowchart TD
Q([What does the scenario need?]) --> A{Records?}
A -- "API calls, who did what" --> CT["AWS CloudTrail"]
A -- "resource settings over time" --> CF["AWS Config"]
A -- "neither" --> B{Findings?}
B -- "software vulnerabilities" --> IN["Amazon Inspector"]
B -- "best-practice gaps, quotas" --> TA["AWS Trusted Advisor"]
B -- "neither" --> C{Audit?}
C -- "collect our evidence" --> AM["AWS Audit Manager"]
C -- "AWS's own reports" --> AR["AWS Artifact"]
| Service | What it does | Use it when the scenario says | Not for |
|---|---|---|---|
| AWS CloudTrail | Records every API call in the account: who, what, when, from where. Bedrock model invocation logging adds the prompts and responses themselves to CloudWatch Logs or S3. | "audit trail", "who invoked the model", "who changed the endpoint", "forensics" | Judging whether a configuration is compliant (that is Config) |
| AWS Config | Records resource configurations over time and evaluates them against rules; conformance packs bundle rules for a standard. | "detect a non-compliant configuration", "was this bucket ever public", "enforce encryption on notebooks", "configuration history" | Vulnerabilities in software (Inspector) |
| Amazon Inspector | Continuously scans EC2 instances, container images in ECR and Lambda functions for software vulnerabilities (CVEs) and unintended network exposure. | "unpatched library in the inference container", "CVE", "vulnerability management" | Threats in progress (GuardDuty) or configuration drift (Config) |
| AWS Audit Manager | Continuously collects evidence from the account and maps it to the controls of a framework (PCI DSS, HIPAA, GDPR, the AWS generative AI best-practices framework), producing assessment reports. | "continuously collect evidence", "prepare for an audit", "map our controls to a framework" | Getting AWS's own reports (Artifact) |
| AWS Artifact | A self-service portal for AWS's compliance reports (SOC, ISO, PCI) and for accepting agreements such as the HIPAA business associate addendum. | "our auditors want AWS's SOC 2 report", "sign the BAA" | Anything about your own resources |
| AWS Trusted Advisor | Checks the account against AWS best practices in cost optimisation, performance, security, fault tolerance, service limits and operational excellence. | "recommendations", "best-practice checks", "approaching a service quota", "open security groups" | Evidence for auditors or detailed vulnerability scanning |
A second ring of services sets the guard rails around accounts rather than inside them. AWS Organizations groups accounts and applies service control policies that cap what any principal can do, which is how a company forbids Bedrock outside approved regions or blocks model providers it has not reviewed. AWS Control Tower sets up a multi-account landing zone with preventive and detective controls already wired to Config. Amazon CloudWatch holds the metrics, logs and alarms that monitoring and observation rely on. The AWS Well-Architected Framework adds a Machine Learning Lens and a Generative AI Lens: question sets for reviewing a workload against best practice, which the exam may name as "a framework for reviewing the architecture".
Memorise one verb per service: CloudTrail logs calls, Config records and evaluates configurations, Inspector scans for vulnerabilities, Audit Manager collects evidence, Artifact hands over AWS's reports, Trusted Advisor recommends. The question "which service shows who deleted the training data" is CloudTrail even though it appears in a compliance context; "which service tells us a SageMaker notebook is not encrypted" is Config even though encryption sounds like KMS.
- AWS Audit Manager ships a prebuilt framework for generative AI best practices on Bedrock, so an assessment can be started against it without writing controls.
- AWS Config conformance packs exist for HIPAA, PCI DSS and NIST, and a common one flags any SageMaker notebook instance with direct internet access.
- AWS Artifact is where compliance teams download the SOC 2 Type II report every six months to hand to their own auditors.
- conformance pack
- A packaged set of AWS Config rules and remediation actions that together represent a standard or an internal policy.
- service control policy
- An AWS Organizations policy that sets the maximum permissions for every account it is attached to; it never grants, it only limits.
- Well-Architected lens
- A domain-specific extension of the Well-Architected Framework's review questions; the ML and Generative AI lenses cover model workloads.
Data governance: lifecycle, logging, residency, monitoring and retention
Data governance is the set of rules about where data may live, how long it stays, who may touch it and how every touch is recorded, applied to the training data, the prompts, the outputs and the logs of an AI system alike.
flowchart TD C["Collect<br/>consent, classification, catalogue entry"] --> S["Store<br/>region chosen, encrypted, access controlled"] S --> U["Use<br/>training, retrieval, prompts, all logged"] U --> A["Archive<br/>lifecycle rule to cheaper storage, still governed"] A --> D["Delete<br/>retention expiry, legal hold lifted, evidence kept"]
- Lifecycle. Data is collected under a stated purpose, stored with a classification, used within that purpose, archived when cold and deleted when its retention period ends. On AWS the mechanics are S3 lifecycle rules (transition to Glacier classes, expire after N days), S3 Object Lock for records that must not be altered, and Backup plans with retention.
- Logging. Every access and every model call is recorded: CloudTrail for API activity, Bedrock model invocation logging for prompts and completions, SageMaker endpoint data capture for inference inputs and outputs, CloudWatch Logs for the application. Logs are themselves data with a retention setting.
- Residency. Data stays in the geography the law or the contract names. AWS Regions are the unit: an S3 bucket, a SageMaker job or a Bedrock invocation lives in one Region and does not leave it unless configured to. Bedrock model availability differs by Region, and cross-region inference routes requests only within a defined geography (for example within the EU or within the US).
- Monitoring and observation. CloudWatch alarms on error rates and latency, Model Monitor on drift, GuardDuty on threats, Config on configuration, Macie on new sensitive data appearing; observation is the human review of what those tools report, on a cadence.
- Retention. Each class of data has a period: prompts and outputs perhaps 30 days for debugging, training datasets for as long as the model that used them is in service, audit logs for the years a regulator requires. The period is enforced by lifecycle rules, not by memory.
Residency is about where the data is processed, not only where it is stored. A Bedrock call from an EU application to a model available only in a US Region sends the prompt across the Atlantic. The fix is to pick a model available in the EU Region, or to use cross-region inference profiles scoped to the EU geography, not to encrypt harder.
"Data must remain in Germany" means choose the Frankfurt Region for every service in the path and check model availability there. "Keep logs for seven years at lowest cost" means S3 lifecycle rules into Glacier Deep Archive with Object Lock if immutability is required. "Prove who accessed the training data" is CloudTrail plus S3 server access logs or CloudTrail data events. "Delete a user's data on request" is a data lifecycle and cataloguing question, not a model question.
- European customers commonly run Bedrock in the Frankfurt Region for residency and use EU-scoped cross-region inference to gain capacity without leaving the geography.
- The AWS European Sovereign Cloud is a separate infrastructure inside the EU, operated by EU residents, for customers whose regulators require operational as well as data residency.
- Financial firms keep CloudTrail logs in a locked S3 bucket in a separate audit account, with Object Lock in compliance mode, so that nobody in the workload account can shorten the retention.
- data residency
- The requirement that data be stored and processed within a named geography.
- retention period
- How long a class of data is kept before deletion, set by law, contract or policy and enforced by a lifecycle rule.
- cross-region inference
- A Bedrock feature that routes requests across a set of Regions within one geography for capacity, without leaving that geography.
Governance processes: policies, reviews, the Scoping Matrix and the people
Governance processes are the human side of compliance: written policies that say what is allowed, reviews on a cadence that check it is still true, a framework for deciding how much scrutiny a given AI use deserves, and training so that the people building it know the rules.
Policies and review cadence
A governance policy states who may use which AI services for what, which data classes may reach a model, which models are approved, what must be logged and who signs off. A review cadence checks it: quarterly for the policy itself, at every release for a high-risk system, continuously through the automated services above. A review strategy is risk-based: a marketing copy assistant gets a light check; a model that influences credit or medical decisions gets an impact assessment, a bias audit and human oversight.
The Generative AI Security Scoping Matrix
AWS's Scoping Matrix is a way to classify a generative AI use by how much of the model is yours, because responsibility for security and governance grows with ownership. It has five scopes.
| Scope | What you are doing | Example | What shifts to you |
|---|---|---|---|
| 1 · Consumer app | Using a public generative AI application under its own terms | Staff using a public chatbot website | Acceptable-use policy, what data staff may paste in; little else is in your control |
| 2 · Enterprise app | Using a vendor's application with generative AI features under a business agreement | Amazon Q Business, an AI feature in a SaaS tool | Identity, permissions, data connectors, contractual data-handling terms |
| 3 · Pre-trained models | Building your own application on a third-party model through an API | An app calling Claude or Titan on Bedrock, with RAG and guardrails | Prompt and output handling, retrieval data, guardrails, logging, IAM, encryption |
| 4 · Fine-tuned models | Customising a third-party model with your data | Bedrock fine-tuning, JumpStart fine-tuning | Everything in scope 3 plus the training data's governance, the custom model as a sensitive asset, evaluation for bias |
| 5 · Self-trained models | Training a model from scratch on your own data | SageMaker training of a proprietary model | Everything: data provenance, the full model lifecycle, licensing of outputs, robustness, documentation |
The matrix is used with five lenses at each scope: governance and compliance, legal and privacy, risk management, controls, and resilience. The point the exam wants is the direction: moving from scope 1 to scope 5, the customer's share of the shared responsibility model grows, the controls become more technical, and the documentation duties (Model Cards, lineage, evaluation records) become mandatory rather than optional.
Transparency standards and team training
Transparency standards say what a system must disclose: that a user is talking to an AI, what data it uses, how confident it is, where an answer came from, and how to reach a human. On AWS the artefacts are SageMaker Model Cards, AWS AI Service Cards for the managed services, Knowledge Base citations and Guardrails' block messages. Team training closes the loop: developers learn the policy and the OWASP list, data engineers learn classification and the privacy techniques, reviewers learn the bias metrics, and everyone learns which data may not leave the account. The AWS Cloud Adoption Framework for AI adds the organisational view, with perspectives on business, people, governance, platform, security and operations.
"A framework to decide how much security scrutiny a generative AI project needs" is the Generative AI Security Scoping Matrix. "Which scope is an app built on Bedrock with RAG" is scope 3, pre-trained models; add fine-tuning and it becomes scope 4. "Staff using a public chatbot" is scope 1, where the only lever is policy. "Which process keeps a policy current" is a review cadence with a risk-based strategy.
- Large companies run AI review boards that classify each new use case on a matrix like this one before granting model access, and require a Model Card and an impact assessment above scope 3.
- AWS's Cloud Adoption Framework for AI is the checklist many customers use for the organisational side: skills, ownership, governance bodies and operating model, alongside the technical controls.
- Amazon Q Business is the typical scope 2 deployment: the governance work is connectors, permissions and data-source approval rather than model security.
- Generative AI Security Scoping Matrix
- AWS's five-scope classification of generative AI uses, from consuming a public app to training your own model, used to decide which security and governance controls apply.
- review cadence
- The fixed schedule on which policies, risk assessments and controls are re-examined.
- AWS CAF for AI
- The Cloud Adoption Framework's AI-specific guidance on the organisational capabilities needed to adopt AI responsibly.
Recap
- Shared responsibility moves with the service: on Bedrock AWS runs the model and the customer owns IAM, data, prompts, guardrails and logging; on SageMaker the customer also owns containers, roles and VPC settings; on EC2 the operating system and the model server too.
- IAM least privilege: a SageMaker execution role for jobs and endpoints, Bedrock permissions scoped to specific model ARNs, Identity Center for people, SCPs as the ceiling.
- Encrypt at rest with KMS (customer managed keys when the customer must hold the key) and in transit with TLS; SageMaker can encrypt inter-container traffic; every key use is in CloudTrail.
- Keep traffic private: VPC-only SageMaker, interface endpoints for Bedrock and SageMaker through PrivateLink, WAF and Shield at the front door, Secrets Manager for third-party keys.
- Macie finds sensitive data in S3, Comprehend finds PII in text; anonymisation, pseudonymisation, tokenisation, masking, differential privacy and synthetic data reduce what the model sees; Lake Formation, checksums, versioning and Object Lock protect access and integrity.
- GuardDuty detects threats, Inspector finds vulnerabilities, Security Hub aggregates; AI-specific threats are prompt injection, jailbreaks, data poisoning, model theft, membership inference and the rest of the OWASP Top 10 for LLM applications.
- Lineage and provenance: Glue Data Catalog, Amazon DataZone, Lake Formation, SageMaker ML Lineage Tracking, Model Cards and Knowledge Base citations answer "where did this come from".
- Standards: ISO 42001 for AI management systems, ISO 27001 for security, SOC reports from Artifact, the EU AI Act's risk tiers, NIST AI RMF's govern, map, measure, manage, plus GDPR, HIPAA, PCI DSS and CCPA by sector.
- One verb each: CloudTrail logs calls, Config records and evaluates configurations, Inspector scans for vulnerabilities, Audit Manager collects evidence, Artifact hands over AWS's reports, Trusted Advisor recommends.
- Data governance is lifecycle, logging, residency, monitoring and retention: S3 lifecycle rules and Object Lock, invocation logging, Region choice and EU-scoped cross-region inference, CloudWatch and Config, retention periods enforced by rules.
- The Generative AI Security Scoping Matrix has five scopes from consumer app to self-trained model; responsibility and documentation duties grow with the scope, and an app on Bedrock with RAG is scope 3.
- Processes: written policies, a risk-based review cadence, transparency standards backed by Model Cards and AI Service Cards, and team training, with the AWS CAF for AI as the organisational frame.
Questions
Try answering each one out loud before opening it. Lead with the one-line answer, then the reasoning, then one detail that shows you have used it.
How does the shared responsibility model change between Amazon Bedrock, SageMaker and a model self-hosted on EC2?
The more managed the service, the more AWS takes: on Bedrock AWS runs the model, hardware and patching and the customer owns identity, data, prompts, guardrails and logging; on SageMaker the customer also owns the containers, execution roles and network settings; on EC2 the customer owns the operating system, patches and the model server as well.
- AWS always secures the physical infrastructure, the hypervisor and the managed control planes.
- The customer always owns their data classification, IAM and what they send to the model.
- Bedrock never uses customer data to train base models, which is part of AWS's side of the bargain.
A question that says "the company wants to minimise its security responsibility" is pointing up the stack toward Bedrock.
What is the least-privilege setup for an application that calls Bedrock and a SageMaker endpoint?
An IAM role for the application, not a user with keys, with a policy that allows invoking only the named Bedrock model ARNs and the specific SageMaker endpoint, plus a separate SageMaker execution role that the endpoint itself assumes to read its model artefacts.
- Identity-based policies attach to the role; resource-based policies on S3 buckets and KMS keys add a second gate.
- People sign in through IAM Identity Center; workloads assume roles.
- Service control policies in Organizations cap what any account may do, for example no Bedrock outside approved Regions.
Bedrock permissions can be scoped per model, so a team approved for one provider's models can be denied another's.
A regulated customer must hold the encryption keys for its training data and its fine-tuned model. What do they use?
AWS KMS customer managed keys: S3 buckets with SSE-KMS under the customer's key, SageMaker volumes and Bedrock custom models encrypted with the same customer managed key, and TLS for everything in transit.
- AWS owned and AWS managed keys exist too, but only a customer managed key gives the customer control of the key policy and rotation.
- Every use of the key appears in CloudTrail.
- SageMaker can also encrypt traffic between training containers.
Deleting or disabling the customer managed key makes the encrypted model unusable, which is sometimes the point.
How do you keep traffic between an application in a VPC and Amazon Bedrock off the public internet?
Create an interface VPC endpoint for the Bedrock runtime service through AWS PrivateLink, so calls resolve to private IP addresses inside the VPC and travel only on the AWS network.
- An endpoint policy can restrict which models or actions the endpoint allows.
- SageMaker Studio and endpoints have the same option, plus a VPC-only mode.
- WAF and Shield protect the application's own public front door; they are not what keeps Bedrock traffic private.
Without internet access the notebook also cannot download packages, so a private package repository or a VPC endpoint for CodeArtifact comes with the design.
Which service finds personally identifiable information in an S3 data lake before training, and which finds it in text at runtime?
Amazon Macie discovers sensitive data such as PII and secrets in S3 at rest; Amazon Comprehend detects PII entities in text as it flows, and a Bedrock Guardrail can redact or block PII in prompts and responses.
- Macie is a discovery and classification service for storage, not a text API.
- Comprehend returns entity types and offsets so the text can be masked.
- Glue DataBrew has transforms to redact or hash columns in bulk.
The usual distractor is offering Macie for runtime text or Comprehend for scanning buckets.
Name four privacy-enhancing techniques and what each preserves.
Anonymisation removes identifiers irreversibly, pseudonymisation replaces them with reversible tokens held separately, masking hides part of a value while keeping its shape, and differential privacy adds calibrated noise so that aggregate results hold while no individual can be inferred; tokenisation and synthetic data are two more.
- Anonymised data falls outside most privacy laws; pseudonymised data does not, because it can be re-linked.
- Synthetic data keeps statistical properties for training without real records.
- Generalisation (age bands instead of birth dates) trades precision for privacy.
Membership inference attacks are the reason differential privacy matters for models trained on personal data.
What is the difference between Amazon GuardDuty, Amazon Inspector and AWS Security Hub?
GuardDuty detects threats in progress from logs and network activity, Inspector scans workloads for software vulnerabilities and network exposure, and Security Hub aggregates findings from both and other tools against security standards.
- "Unusual API calls from a new geography" is GuardDuty.
- "A CVE in the inference container image" is Inspector.
- "One dashboard of all findings scored against a standard" is Security Hub.
None of them evaluates configuration compliance; that remains AWS Config.
What threats are specific to AI systems, and which list catalogues them for LLM applications?
Prompt injection, jailbreaking, training and retrieval data poisoning, model theft or extraction, membership inference and model inversion, sensitive information disclosure, insecure output handling and excessive agency; the OWASP Top 10 for LLM Applications catalogues the application-level ones and MITRE ATLAS catalogues adversary techniques against ML.
- Prompt injection is direct (in the user's input) or indirect (in a retrieved document).
- Excessive agency is an agent with tools and permissions beyond its task.
- Guardrails, input validation, least-privilege tool roles and human review are the mitigations.
Model files downloaded from public hubs can carry malicious code, which is why model provenance is a supply-chain control.
How is data lineage recorded on AWS, and why does an AI team need it?
The Glue Data Catalog records technical metadata, Amazon DataZone adds a business catalogue with owners and access approval, Lake Formation records permissions, SageMaker ML Lineage Tracking links datasets, processing jobs, training jobs and models, and Model Cards record training data sources; together they answer where a model's data came from and who may use it.
- Lineage is required evidence under algorithm accountability laws and for reproducing a model.
- Knowledge Base citations give the same traceability to generated answers.
- Provenance also covers licence and consent, which decide whether data may be used for training at all.
A compliance reviewer should be able to pick a production model and walk back to the exact input files and container image that produced it.
Which standard certifies an AI management system, and which framework describes AI risk management with the functions govern, map, measure and manage?
ISO/IEC 42001 is the AI management-system standard; the NIST AI Risk Management Framework is the voluntary framework with the four functions.
- ISO 27001 is the information security equivalent.
- The EU AI Act is a law, not a standard, with risk tiers from unacceptable to minimal.
- SOC 2 is an auditor's attestation about controls, delivered for AWS through Artifact.
AWS holds ISO 42001 certification for services including Bedrock and SageMaker, which covers AWS's side and not what the customer builds.
Match the service: audit who invoked a model, detect an unencrypted notebook, collect evidence for a HIPAA audit, download AWS's SOC report, find a vulnerable library, check for open security groups.
CloudTrail, AWS Config, Audit Manager, AWS Artifact, Amazon Inspector, Trusted Advisor, in that order.
- CloudTrail logs API calls; Config records and evaluates configurations.
- Audit Manager collects your evidence; Artifact hands over AWS's reports.
- Inspector scans for CVEs; Trusted Advisor checks best practices including security groups and quotas.
Bedrock model invocation logging extends CloudTrail's "who called" with the prompts and completions themselves, stored in CloudWatch Logs or S3.
A company's data must stay in the EU. What does that mean for a Bedrock application?
Every component in the path runs in an EU Region such as Frankfurt, the chosen model must be available there, and if cross-region inference is used it must be an EU-scoped profile so requests never leave the geography.
- Residency covers processing, not only storage; a US-only model would move the prompt.
- S3 buckets, Knowledge Base vector stores and logs all need the same Region.
- The AWS European Sovereign Cloud exists for customers who also need EU-resident operations staff.
Encryption does not satisfy a residency requirement; location does.
What are the data governance strategies the exam names, and what AWS mechanism enforces each?
Lifecycle (S3 lifecycle rules and Object Lock), logging (CloudTrail, Bedrock invocation logging, endpoint data capture), residency (Region choice and scoped cross-region inference), monitoring and observation (CloudWatch, Config, Model Monitor, Macie) and retention (expiry rules and log retention settings).
- Retention periods differ by data class: prompts briefly, training data for the model's life, audit logs for years.
- Logs are data too and need their own retention and access control.
- Object Lock in compliance mode prevents even administrators from shortening retention.
Keeping audit logs in a separate account with Object Lock is the standard pattern for regulators who require tamper-evidence.
What is the Generative AI Security Scoping Matrix, and which scope is an application built on Bedrock with a Knowledge Base?
It is AWS's five-scope classification of generative AI use, from consuming a public app (scope 1) to training your own model (scope 5), used to decide which controls apply; an application on a third-party model through Bedrock with RAG is scope 3, pre-trained models.
- Scope 2 is a vendor's enterprise app such as Amazon Q Business; scope 4 is a fine-tuned model.
- Responsibility, technical controls and documentation duties grow with the scope number.
- Each scope is examined through governance, legal and privacy, risk, controls and resilience.
Adding Bedrock fine-tuning to the same application moves it to scope 4 and makes the custom model a sensitive asset to protect and evaluate.
What processes make governance real rather than a document?
Written policies about which services, models and data classes are allowed; a review cadence with a risk-based strategy so high-impact systems get impact assessments and bias audits; transparency standards backed by Model Cards, AI Service Cards and citations; and training so that each role knows its part.
- Automated services (Config, Audit Manager, Model Monitor) run continuously between human reviews.
- The Scoping Matrix decides how deep a review goes.
- The AWS CAF for AI frames the organisational capabilities: ownership, skills, governance bodies.
An AI review board that classifies each use case and requires a Model Card above scope 3 is the common shape of this in large companies.
Why does the exam treat "algorithm accountability laws" as a documentation question?
Because such laws require organisations to assess, document and explain automated decisions, so meeting them means producing artefacts: impact assessments, Model Cards, lineage records, evaluation results and audit trails.
- The EU AI Act's high-risk tier is the best-known example, with technical documentation and human oversight duties.
- GDPR adds the right to meaningful information about automated decisions.
- SageMaker Model Cards and ML Lineage Tracking are the AWS tools that answer these duties.
Choosing an interpretable model for a regulated decision, covered in the responsible AI article, is often the simplest way to be able to explain it.