A mid-sized insurance company decides to build an assistant that answers adjusters’ questions using internal claim files. The prototype works beautifully in a week. Then the security team asks four questions: Who can call the model? Is claim data encrypted, and whose keys protect it? Can the company prove who did what last Tuesday? And did anyone put customer Social Security numbers into the system?
Those questions point to four important AWS services: IAM, KMS, CloudTrail, and Macie. Add governance and you have the foundation of a layered security approach for AI workloads on AWS.
This topic belongs to the security, compliance, and governance portion of the AWS Certified AI Practitioner (AIF-C01) exam. The exam focuses on recognizing which service addresses which requirement—not memorizing every configuration option.
Start with the shared responsibility model
AWS is responsible for security of the cloud, including physical facilities, hardware, and the underlying infrastructure. Customers are responsible for security in the cloud, including their data, identities, permissions, application logic, and service configuration. The exact division varies by service.
| Approach | Example | AWS generally handles | Customer generally handles |
|---|---|---|---|
| Pretrained AI API | Amazon Comprehend, Amazon Textract | Service infrastructure, managed models, and platform security | Data submitted, IAM permissions, application security, and use of outputs |
| Managed foundation models | Amazon Bedrock | Managed model hosting and underlying service infrastructure | Access control, data classification, prompts and outputs, guardrail configuration, and application security |
| Build and operate ML workloads | Amazon SageMaker AI | Underlying AWS infrastructure and managed service components | Training data, code, model artifacts, endpoint configuration, networking, and access controls according to the service boundary |
The general pattern is simple: the more control you take, the more responsibility you carry. A managed API reduces operational work; building and operating more of the ML stack gives you flexibility but also increases your security responsibilities.
AWS also publishes a Generative AI Security Scoping Matrix. It helps classify generative AI use cases according to the level of customer ownership—from consuming a public AI application to developing and training a model—and highlights the security considerations for each scope. Use the current AWS version when assessing a real architecture.
Remember: Customers remain responsible for deciding what data they submit and who in their organization may access it.
The data privacy starting point
A common concern is whether prompts and other customer content sent to a model will be used to train someone else’s model. AWS’s Amazon Bedrock data-protection documentation describes how customer content is handled and states that Bedrock does not use customer inputs and outputs to train the underlying foundation models. For a production assurance or contractual statement, always review the current AWS documentation and applicable service terms rather than relying on a simplified summary.
That protection does not remove the customer’s responsibility for access control, data classification, retention, regulatory obligations, or the security of logs and connected systems. Privacy is not delivered by one service setting.
IAM: who is allowed to do what?
AWS Identity and Access Management (IAM) controls authentication and authorization. It answers: Who is making this request, and are they permitted to perform this action on this resource?
- Least privilege: grant only the permissions required for the task.
- Roles and temporary credentials: applications and AWS services should generally assume IAM roles rather than embed long-term access keys in code.
- Resource-level permissions: where supported, policies can restrict actions to specific resources. For Bedrock, permissions can be scoped to approved model resources and other supported resources.
- Separation of duties: development, production approval, and audit responsibilities should not automatically share the same permissions.
Practical scenario: A retail chatbot runs with an IAM role that can invoke one approved foundation model and read one designated knowledge base. It cannot modify guardrails, delete audit trails, or read unrelated storage. If the application is compromised, the role limits the permissions available to an attacker.
For multi-account environments, AWS Organizations service control policies (SCPs) can define the maximum permissions available to member accounts. An organization might use SCPs to restrict access to unapproved AI services or Regions. An SCP sets permission guardrails; it does not grant permissions by itself.
Common exam trap: IAM controls access to AWS resources and APIs. It does not inspect prompt meaning or filter harmful response content. Use an appropriate content-safety control, such as Amazon Bedrock Guardrails, for supported content filtering.
AWS KMS: protecting data with encryption
AWS Key Management Service (AWS KMS) creates and manages cryptographic keys used by AWS services and applications. Encryption protects data at rest (stored data) and in transit (data moving across networks, typically protected with TLS).
Many AWS services encrypt data at rest by default. A key decision is whether to use an AWS-owned key or a key that you control.
| Key type | Who controls it? | Typical reason to choose it |
|---|---|---|
| AWS-owned key | AWS manages it outside your account | Convenience; no customer key administration |
| AWS-managed key | AWS manages it in your account | Service-integrated encryption with limited customer key administration |
| Customer-managed key | You manage it through AWS KMS | More control over key policies, rotation settings, grants, and auditability |
Customer-managed keys are useful when policy requires control over key permissions and lifecycle. Support is feature-specific: some Amazon Bedrock resources, knowledge-base configurations, evaluation jobs, and SageMaker AI storage workflows support customer-managed keys, but the exact options differ by resource. Check the documentation for the specific feature before designing around a key requirement.
Practical scenario: A financial firm encrypts training data in S3 with a customer-managed KMS key. The security team can change the key policy or disable the key to prevent future cryptographic use. Disabling a key is not a magic recall mechanism: data already decrypted, cached plaintext, and copies protected by other keys may remain accessible. Key disablement must be part of a broader incident-response plan.
Remember: KMS manages keys. It does not decide which employees should access the application; IAM and the relevant resource policies do that.
AWS CloudTrail: the audit trail
AWS CloudTrail records AWS API activity. It helps answer: Who made an API request, what action was requested, which resource was involved, and when did it happen?
CloudTrail records management events by default. Some data events require explicit configuration and can be high volume. Amazon Bedrock operations are not all categorized identically: for example, common runtime calls such as InvokeModel, InvokeModelWithResponseStream, Converse, and ConverseStream are documented as management events, while certain other operations—including agent runtime calls and knowledge-base retrieval operations—are data events that require suitable advanced event selectors to capture.
Do not confuse CloudTrail with Amazon Bedrock model invocation logging. Invocation logging is a separate Bedrock feature that, when enabled, can capture supported request and response content plus metadata and send logs to Amazon CloudWatch Logs and/or Amazon S3. It is disabled by default, applies to supported calls through the Bedrock Runtime endpoint, and should be configured carefully because prompts and responses may contain sensitive information.
| Tool | What it records |
|---|---|
| CloudTrail | AWS API activity and identity/context details for supported events |
| Bedrock model invocation logging | Supported model request and response content plus invocation metadata, when enabled |
| Amazon CloudWatch | Operational metrics, logs, dashboards, and alarms; it can also receive Bedrock invocation logs |
Because invocation logs may contain confidential prompts, retrieved content, or generated responses, encrypt their destinations, restrict access, and set retention rules. Logging is useful for audits and troubleshooting, but it also creates data that must be protected.
Easy way to remember it: CloudTrail is the security camera at the door. It records API activity. Bedrock invocation logging is the separate mechanism that can capture the model conversation content.
Amazon Macie: finding sensitive data in S3
Amazon Macie uses machine learning and pattern matching to discover and report sensitive data in Amazon S3. It can identify supported types of personally identifiable information (PII), financial information, and credentials in eligible S3 objects. It also evaluates S3 bucket security posture and can generate findings for risks such as public access.
Macie is useful before training, fine-tuning, or indexing data for a knowledge base. For example, a team can inspect eligible S3 documents and datasets before allowing them into an AI workflow.
Practical scenario: Before indexing claim files, an insurer runs Macie discovery jobs against its S3 buckets. The findings reveal that text-based claim records and supported document files contain driver-license numbers and Social Security numbers. The team reviews, removes, masks, or restricts the affected records before ingestion.
Important limitation: Macie analyzes supported S3 object formats and storage classes. It does not inspect the visual contents of image files, nor does it scan arbitrary live databases or streams in place. If information is held elsewhere, an organization may export it to a supported S3 format for analysis. A scanned image may need OCR or another extraction process first; do not assume Macie reads the image itself.
Macie discovers sensitive data; it does not automatically redact every finding or control what a model says. For related tasks:
- Amazon Comprehend: can detect and redact supported PII in text submitted for analysis.
- Amazon Bedrock Guardrails: can detect or mask supported sensitive information in model inputs and outputs at runtime, according to the configured policy and API.
Keep the stages separate: Macie scans eligible stored objects in S3; Comprehend analyzes text; Guardrails applies configured runtime filters.
Network controls and private connectivity
Organizations may want AI traffic to avoid traversing the public internet. AWS PrivateLink with VPC interface endpoints enables private connectivity from a VPC to supported AWS services, including Amazon Bedrock, without requiring traffic to traverse the public internet. IAM permissions and endpoint policies can further restrict access. SageMaker AI workloads can also be configured with VPC networking controls, depending on the feature.
Private connectivity reduces network exposure, but it does not replace identity controls, encryption, application security, or monitoring.
Governance: policies, lineage, and accountability
Security controls protect systems. Governance defines how AI may be used, who approves it, what data is permitted, and who is accountable. Typical governance questions include:
- What data may be used for training or retrieval, and who approved it?
- Where did the data come from, and how has it changed (data lineage)?
- How long is data retained, and how is it deleted?
- Which models are approved for which use cases?
- How are models documented, reviewed, and monitored?
- Who is accountable when an AI system causes harm or produces an incorrect result?
| AWS service or capability | Governance contribution |
|---|---|
| AWS Artifact | Provides on-demand access to AWS compliance reports and agreements. |
| AWS Config | Tracks resource configurations and evaluates them against rules. |
| AWS Audit Manager | Helps collect evidence and map activities to compliance frameworks. |
| AWS Trusted Advisor | Provides checks and recommendations across areas including security. |
| Amazon SageMaker Model Cards | Documents model details, intended use, risk information, and evaluation information. |
| AWS Organizations | Applies policy guardrails across multiple accounts. |
AWS Audit Manager framework availability and names can change. Verify current framework coverage in the AWS documentation before stating that a particular generative AI framework is available in a given Region or account.
Secure data engineering for AI
AI security begins before a model is invoked. Important practices include:
- Assess data quality, completeness, accuracy, and consistency.
- Protect data integrity to reduce unauthorized changes and data-poisoning risk.
- Use privacy-enhancing techniques such as anonymization, masking, and data minimization where appropriate.
- Control access with least privilege and encryption.
- Maintain data lineage, retention, and deletion records.
- Back up and version critical datasets so changes can be traced and recovered.
Remember: poor data controls can become model risks downstream. A model trained or grounded on unauthorized, corrupted, or sensitive data can create security and compliance problems even if the model service itself is configured correctly.
Compliance awareness
AI applications may be subject to privacy laws, financial-sector requirements, healthcare rules, contractual obligations, and internal standards depending on the industry and geography. AWS provides compliance programs and reports through AWS Artifact, but compliance is shared. A service being eligible for a compliance program does not automatically make your workload compliant. Your architecture, configuration, data handling, access controls, and operating procedures must meet the obligations that apply to your organization. Involve qualified legal and compliance professionals for specific interpretations.
Putting it together: a layered secure AI assistant
- Data layer: store source documents in Amazon S3, apply appropriate encryption, and use Macie to discover sensitive data in supported objects before ingestion.
- Retrieval layer: index approved documents in a knowledge base and restrict access to data sources and retrieval resources.
- Application layer: run the assistant with a least-privilege IAM role that can invoke only approved resources.
- Model layer: connect to Amazon Bedrock through a VPC interface endpoint where private connectivity is required; configure appropriate Guardrails policies.
- Observability layer: use CloudTrail for API activity and, if needed, enable model invocation logging to a protected S3 or CloudWatch destination. Use CloudWatch alarms for operational signals.
- Governance layer: use SCPs for account-level permission boundaries, document approved models and use cases, and maintain lineage, retention, and review processes.
No single service delivers all of this. Each layer addresses a different risk.
Match the question to the AWS service
| Question in the scenario | Service or control to consider |
|---|---|
| Who is allowed to invoke this model? | IAM |
| How do we control encryption keys? | AWS KMS |
| Who called an API, and when? | AWS CloudTrail |
| Does eligible S3 data contain PII? | Amazon Macie |
| How do we connect privately to a supported service? | AWS PrivateLink / VPC interface endpoint |
| Where are AWS compliance reports? | AWS Artifact |
| How do we track resource configuration compliance? | AWS Config |
| How can supported sensitive content be filtered at runtime? | Amazon Bedrock Guardrails |
Common mistakes and misconceptions
- “AWS secures everything, so I do not have to.” Customers remain responsible for their data, identities, permissions, and configuration.
- “CloudTrail records the full prompt and response.” CloudTrail records API events; Bedrock invocation logging is the separate feature for supported request and response content.
- “Macie scans every database and image.” Macie discovers sensitive data in eligible S3 objects and supported formats; it does not inspect image pixels or arbitrary live data sources in place.
- “Encryption alone makes data private.” Encryption must be combined with access control, data classification, and sound retention practices.
- “IAM filters harmful prompts.” IAM authorizes AWS actions; content filtering is a different control.
- “A compliant AWS service makes my application compliant.” Your configuration and use of the service must meet your obligations.
- “Disabling a KMS key instantly erases every copy.” It blocks future cryptographic use of that key but cannot recall plaintext or copies protected by other keys.
Exam-focused insights for AIF-C01
- Match the verb to the service: control access = IAM; manage encryption keys = KMS; audit API activity = CloudTrail; discover sensitive S3 data = Macie.
- Apply shared responsibility: identify what AWS manages and what the customer must configure or protect.
- Prefer least privilege: narrow permissions limit the impact of a compromised application.
- Look at the data stage: discovery of sensitive stored data in S3 points to Macie; runtime prompt filtering points to Guardrails.
- Choose layered controls: no single AWS service solves every security, privacy, and compliance requirement.
Key takeaways
- AWS secures the cloud infrastructure; customers secure their data, identities, permissions, and configurations.
- IAM controls access, KMS manages encryption keys, CloudTrail records API activity, and Macie discovers sensitive data in eligible S3 objects.
- Bedrock model invocation logging is separate from CloudTrail and can capture supported prompts and responses when enabled.
- PrivateLink provides private connectivity to supported services, while governance establishes policies, accountability, and evidence.
- Compliance eligibility is not the same as compliance of your own workload.
Original AIF-C01 practice questions
These are original, unofficial educational practice questions written by CloudExamPro. They are not actual AWS exam questions.
Question 1: A chatbot must invoke only one approved foundation model. Which control best limits the impact if the application is compromised?
Correct answer: B — Use a least-privilege IAM role that permits invocation of only the approved model. IAM authorization can restrict the application’s permitted AWS actions and resources. Administrator permissions, embedded broad access keys, or removing IAM would increase risk rather than limit it.
Question 2: Before using eligible files in an S3 bucket for model training, a company wants to discover supported PII such as identification numbers in the stored documents. Which service is the best fit?
Correct answer: B — Amazon Macie. Macie discovers sensitive data in supported S3 objects. CloudTrail records API activity, KMS manages encryption keys, and Config evaluates resource configuration.
Question 3: An auditor asks which identity deleted a Bedrock guardrail configuration and when the API action occurred. Which service should the auditor consult?
Correct answer: C — AWS CloudTrail. CloudTrail records supported API activity and identity details. Macie discovers sensitive S3 data; Polly and Comprehend have different AI workloads.
Question 4: A firm requires customer control over the key policy for encryption of its AI training data. Which option best meets this requirement?
Correct answer: B — Use a customer-managed key in AWS KMS, if the selected storage or service feature supports it. Customer-managed keys provide greater control over key policies and lifecycle. AWS-owned keys do not provide the same customer management. An unencrypted bucket or Rekognition does not meet the requirement.
Question 5: Which statement best describes shared responsibility when a company uses Amazon Bedrock?
Correct answer: C — AWS secures the underlying infrastructure and managed service, while the customer manages access, data, and application configuration. AWS manages physical facilities; the customer decides who can access its application and how its data is classified. The responsibility split varies with the service and level of control.
Frequently asked questions
Does AWS use my Amazon Bedrock data to train its foundation models?
AWS’s Bedrock data-protection documentation states that customer inputs and outputs are not used to train the underlying foundation models. Review the current AWS documentation and service terms before making a contractual or customer-facing assurance.
What is the difference between CloudTrail and CloudWatch?
CloudTrail records AWS API activity for auditing. CloudWatch collects operational metrics and logs and supports dashboards and alarms. Bedrock invocation logs can also be delivered to CloudWatch Logs when configured.
Does Amazon Macie work on databases and live data streams?
Macie is designed for sensitive-data discovery in eligible Amazon S3 objects. Data held elsewhere may need to be exported to a supported S3 format for analysis. It does not inspect image pixels or arbitrary live streams in place.
Do I always need a customer-managed KMS key?
No. AWS services often provide encryption by default. Customer-managed keys are useful when you need more control over key policies and lifecycle, but support varies by service feature and resource.
What is data lineage, and why does it matter for AI?
Data lineage records where data originated and how it changed. It helps teams verify that training and retrieval data is appropriate, permitted, and traceable during reviews or audits.
Official AWS references
- AWS Certified AI Practitioner certification and exam guide
- AWS Shared Responsibility Model
- Amazon Bedrock User Guide
- Amazon Bedrock data protection
- Monitor Amazon Bedrock API calls with CloudTrail
- Amazon Bedrock model invocation logging
- Protect Bedrock workloads with VPC and AWS PrivateLink
- AWS Identity and Access Management
- AWS Key Management Service
- AWS CloudTrail
- What is Amazon Macie?
- Macie supported storage classes and formats
- AWS Artifact
- AWS Responsible AI overview
Keep learning
Continue with prompt injection, jailbreaking, and hallucination risks, responsible AI and human oversight, AWS AI service comparisons, how RAG works, and AI agents and tool workflows.
Keep building your AIF-C01 skills
Security questions reward the habit of matching each requirement to the right service. Check your understanding with our free AIF-C01 diagnostic exam. For deeper scenario-based practice with detailed explanations, explore the AIF-C01 Premium practice exams.
Original Practice Questions — No Dumps. No Shortcuts.
Continue your AIF-C01 preparation: The AWS AIF-C01 study guide places security, privacy, and governance in context with the exam’s other four domains.