Based on the AIF-C01 exam guideReport an error
Until yesterday we looked at responsible AI, which is about making AI fair and trustworthy. Today is technical defense, that is, AI security. There is no separate AI-only security technology; the point is applying AWS's standard security principles to the AI/ML context. The starting point is the Shared Responsibility Model.
| Category | Responsible party | Examples |
|---|---|---|
| Security of the cloud | AWS | Data centers, hardware, global infrastructure, the foundation of managed services |
| Security in the cloud | Customer | Data classification and encryption, IAM permission settings, access control, network configuration |
The key one-liner: "AWS is responsible for security of the cloud, and the customer is responsible for security in the cloud."
The more you use managed services (Bedrock, SageMaker, and so on), the more responsibility AWS takes on. But "who the data is shown to (IAM)," "what data to put in," and "how to manage the encryption keys" are the customer's part. If the exam asks, "When calling a model with Bedrock, who is responsible for managing access permissions to the input data?", the answer is the customer.
Applying the same principle to a single generative AI application looks like this.
| Item | AWS | Customer |
|---|---|---|
| The servers, GPUs, and data centers that run the model | Responsible | Not applicable |
| Availability and patching of the Bedrock service itself | Responsible | Not applicable |
| Who can call which model (IAM policy) | Provides the tools | Configures it |
| What data to put in the prompt | Not applicable | Decides |
| Access permissions and encryption keys for the S3 documents uploaded to a knowledge base | Provides the feature | Configures it |
| The Guardrails configuration that filters harmful output and personal information | Provides the feature | Configures it |
| Keeping and reviewing invocation records | Provides the feature | Turns it on and reviews it |
| The judgment on whether to trust a model response as is | Not applicable | Responsible |
IAM (Identity and Access Management) controls "who can do what." In AI/ML too, the core principle is Least Privilege.
| IAM element | One-line description | Example in an AI context |
|---|---|---|
| User | An identity corresponding to one person or application | A data scientist's individual account |
| Group | A unit that bundles users to give them the same permissions | An "ML engineers" group |
| Role | A temporary credential assumed when needed. Services can assume it too | The execution role assumed by a SageMaker training job |
| Policy | A document listing the actions and resources to allow or deny | "Allow read-only on this bucket," "Allow calling only specific models" |
⚠️ Trap: "Giving administrator permissions is convenient" is the worst anti-pattern. Also, it is not "once permissions are granted, you are done"; you must review them periodically and revoke permissions that are not used. On the exam, "grant everyone full permissions" is a wrong answer to "how do you strengthen security?"
Data must be protected in two states.
| State | What it prevents | AWS means |
|---|---|---|
| At rest | Theft of data stored on disks and storage | Encrypt S3, EBS, SageMaker volumes, etc. with KMS |
| In transit | Eavesdropping on data traveling over the network | Communication encrypted with TLS/HTTPS |
KMS keeps the key itself securely while also controlling "who can decrypt with this key" in combination with IAM. In other words, encryption and access control work together. Even if you encrypt data, it is meaningless if you give key access to anyone. Encryption is complete only when paired with IAM least privilege.
PII (Personally Identifiable Information), that is, names, national ID numbers, phone numbers, card numbers, and so on, must be protected especially strictly. AWS provides tools that automatically find and protect PII.
| Service | Role |
|---|---|
| Amazon Macie | Automatically detects and classifies PII and sensitive information in data stored in S3 |
| Amazon Comprehend (PII detection) | Identifies PII in text and masks/removes it |
| Amazon Bedrock Guardrails (PII filter) | Masks PII in the input and output of generative AI |
The three tools are separated by "which data, when, and how."
| Category | Amazon Macie | Amazon Comprehend | Bedrock Guardrails |
|---|---|---|---|
| Target | Objects already stored in S3 | Text that we pass to it | Prompts and responses of generative AI |
| Timing | After storage, periodic and continuous checks | Inside the processing pipeline | The very moment the conversation passes through |
| What it does | Finds and reports where sensitive data is | Finds and masks PII in text | Blocks or masks PII in input and output |
| Output | Finding reports | PII locations and types, masked text | Filtered responses |
| Clue in the passage | "S3 bucket," "where the sensitive data is" | "Identify and mask in text," "preprocess training data" | "Chatbot," "prompts and responses" |
As a hypothetical case, an insurance company wanted to use customer support records as training data. Using them as they were risked leaking names and addresses into the model (a privacy violation). The team ① first scanned with Macie to see which S3 buckets held PII, ② masked personal information in the text with Comprehend PII detection before using it for training, and ③ applied the Bedrock Guardrails PII filter to the deployed chatbot so personal information would not go out in the output either. It is a case of blocking PII at every stage of the data lifecycle.
By default, AWS service APIs are accessed through public endpoints. When handling sensitive data, it is safer to keep traffic off the public internet. AWS PrivateLink solves this.
🔍 Going deeper: The answer to the scenario "I use Bedrock and want the data not to go through the internet" is PrivateLink (a VPC endpoint). Encryption (protecting the data's content) and PrivateLink (protecting the path) are defenses at different layers. Encryption makes "the content unreadable," while PrivateLink makes it "not go over a public path in the first place."
| Question | IAM | KMS | TLS | PrivateLink |
|---|---|---|---|---|
| What it protects | Who can do it | Stored content | Content in motion | The path in motion |
| What happens without it | Anyone can call and view | Content exposed if storage leaks | Content exposed if eavesdropped | Traffic goes via the public internet |
| Can they substitute for each other | No | No | No | No |
The exam guide lists, as security and privacy considerations for AI systems, the existing security items (application security, threat detection, vulnerability management, infrastructure protection, encryption at rest and in transit) together with items unique to generative AI.
| Threat | What it is | Response |
|---|---|---|
| Prompt injection | Hiding instructions in the input to make the model ignore its original guidance | Guardrails prompt attack filter, input validation, minimizing the permissions the model can use |
| Jailbreaking | Bypassing safeguards to elicit prohibited content | Guardrails content filters, denied topics |
| Data leakage | Personal or internal information is mixed into responses | PII filter, output filtering and validation, access control on knowledge base documents |
| Harmful output (toxicity) | Generating inappropriate content such as hate and violence | Guardrails content filters |
| Untraceability | Not knowing who asked what and what went out | Audit trails and logging of AI interactions (Day 4) |
| Requirement in the passage | Answer | Options eliminated and why |
|---|---|---|
| "Let data scientists read only a specific bucket" | IAM policy (least privilege) | KMS: key management, not the main means of setting the allowed scope per user |
| "A training job needs to access S3" | IAM role | Storing access keys in code: risk of leakage |
| "Encrypt stored training data and control the keys ourselves" | AWS KMS | TLS: protection in transit |
| "So API calls cannot be eavesdropped on" | TLS (encryption in transit) | Encrypting S3 with KMS: protection at rest |
| "So traffic does not pass through the public internet" | AWS PrivateLink | Encryption: protects the content but the path stays the same |
| "We don't know which S3 buckets hold sensitive data" | Amazon Macie | Comprehend: you have to pass it the text |
| "Mask names and phone numbers in support text, then train" | Amazon Comprehend | Macie: only finds, does not mask |
| "So card numbers do not go out in chatbot responses" | Bedrock Guardrails | Macie: real-time conversation is not its target |
| "A user types 'ignore the previous instructions'" | Guardrails (prompt attack filter) | PrivateLink: unrelated to the network path |
| "We want to take the database password out of the code" | AWS Secrets Manager | Storing it in plain text in S3: that is not secret management |
The gist of today is not AI-specific magic but applying AWS's standard security principles to the ML pipeline without gaps. Tomorrow we go a step beyond security to data governance and compliance (data provenance and quality, model governance, CloudTrail auditing and logging, legal and ethical considerations of generative AI).
Click a choice to reveal the answer and explanation.
Question 1
In the AWS shared responsibility model, when calling a model with Amazon Bedrock, who is responsible for "setting IAM permissions for who can access input data"?
Question 2
When granting data scientists access to a training S3 bucket, what's the safest approach?
Question 3
Which statement correctly describes "encryption at rest" and "encryption in transit"?
Question 4
Training data contains customer support text with names and ID numbers. You want to automatically identify and mask this personal information (PII). What service is most appropriate?
Question 5
A heavily regulated financial company wants to use Amazon Bedrock while keeping traffic from going through the public internet and only within AWS's internal network. What's the most appropriate approach?