
Module 16 Lesson 2: IAM for AI
Least privilege for models. Learn how to use IAM roles, policies, and identities to control which users and applications can access your AI models.
Module 16 Lesson 2: Identity and Access Management (IAM) for AI
In a cloud environment, IAM (Identity and Access Management) is how you answer the question: "Who is allowed to talk to'The Brain'?"
1. The "Default Admin" Mistake
When people first set up AI in the cloud, they often use a "Power User" role to get things working quickly.
- The Risk: If your web server is hacked, the attacker can use those "Power User" permissions to not only chat with the AI but also Delete the Model, change the pricing tier, or read other customer's logs.
2. Granular Permissions (Least Privilege)
You should use specific permissions for specific tasks:
Bedrock:InvokeModel: The only permission a chat bot needs.Bedrock:ListFoundationModels: Only needed for a developer's dashboard.Bedrock:CreateModelCustomizationJob: Only needed for your Fine-Tuning pipeline.- Rule: Never give
Bedrock:*orOpenAI:*to a live application.
3. Managed Identities (No-Key Auth)
Keys are dangerous. Identities are safe.
- Azure: You can give your "Web App" a Managed Identity. The Web App just asks the Azure environment for an "Identity Token."
- Benefit: There is no "Password" to leak. An attacker who steals your code can't use it elsewhere because the identity is tied to the specific server hardware.
4. Conditional Access and MFA
For highly sensitive AI models (like one that handles financial summaries):
- Conditional Access: Set a rule that the model can only be invoked from your Corporate Office IP address.
- MFA: Require the developer to provide a Multi-Factor Authentication code before they can update the System Prompt or a Fine-tuning dataset.
Exercise: The IAM Architect
- You have a "Public Chatbot" and an "Internal HR Bot." Should they use the same IAM role? Why?
- What is the difference between an
IAM Policyand anIAM Role? - How can you use "Tags" in AWS to control which models a specific department can use?
- Research: What is "Azure RBAC" for Cognitive Services?
Summary
IAM is the foundation of cloud security. By moving from "One master key" to "Many restricted identities," you ensure that even if one part of your system is compromised, the "Brain" of your company remains safe.
Next Lesson: Invisible walls: Network isolation in AI clouds.