AWS IAM (Users, Access Keys & Roles) ➔ Microsoft Entra ID (Azure AD) & Service Principals
From AWS IAM Users, Access Keys & Roles to Microsoft Entra ID Service Principals & DefaultAzureCredential.
In AWS, applications authenticate using an IAM User with an Access Key/Secret or assume an IAM Role via STS. In Azure, you create an 'App Registration & Service Principal' with a 'Client Secret' (or use `az login` locally). In Python, `DefaultAzureCredential()` gives you the exact same automatic multi-environment discovery as the AWS Boto3 credentials chain!
1. Architectural Mechanism Comparison
AWS IAM (Users, Access Keys & Roles)
IAM Users with Access Key ID + Secret Access Key, or IAM Roles assumed via AWS STS. Configured locally via `aws configure` in `~/.aws/credentials`.
- Universal `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables.
- AWS STS (Security Token Service) for temporary role assumption.
- AWS Secrets Manager for automated secret rotation.
Microsoft Entra ID (Azure AD) & Service Principals
App Registrations & Service Principals (SPN) with Client Secrets or Managed Identity. Local development uses `az login` or `DefaultAzureCredential()` chain.
- Managed Identity: 100% keyless token generation inside Azure.
- `DefaultAzureCredential()` chain automatically detects env vars, Managed Identity, and local `az login`.
- Separation of management plane (Contributor) from data plane (Storage Blob Data Contributor).
2. Interactive Terminology & Concept Bridge
Interactive Concept Bridge: Terminology & Architectural Mapping
Click any concept below to see how your AWS knowledge directly maps into AZURE.
AWS IAM User / Machine Account
Non-human programmatic user in AWS IAM.
App Registration & Service Principal (SPN)
Application identity registered in Microsoft Entra ID.
Both represent machine identities for scripts and services.
3. Visual Architecture Pipeline (Microsoft Entra ID (Azure AD) & Service Principals)
IAM Mental Model: Policy = Principal (“Who”) + Role (“What”) + Resource (“Where”)
Click any section below or run the simulation to see how Google Cloud evaluates IAM policy bindings.
2. The Role ('WHAT' they can do)
Predefined & Custom Roles (Collections of Exact Permissions)
A Role is a collection of fine-grained permissions (e.g. `storage.objects.get`, `bigquery.jobs.create`). Predefined roles are curated by Google, while Custom roles provide surgical least-privilege control.
- •Predefined roles (e.g. `roles/bigquery.dataViewer`) maintained and updated automatically by Google.
- •Custom roles let you bundle exact permissions to enforce strict least-privilege compliance.
- •Primitive roles (`Owner`, `Editor`, `Viewer`) are legacy anti-patterns to avoid in production.
4. Side-by-Side Code, CLI & Terraform Translator
Side-by-Side Code & Syntax Translator
# AWS: Local Python Script (Boto3)
import boto3
# Boto3 automatically checks:
# 1. AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY env vars
# 2. Local ~/.aws/credentials (from 'aws configure')
s3 = boto3.client('s3')
response = s3.list_objects_v2(Bucket='my-lake-bucket', Prefix='orders/2026')
for obj in response.get('Contents', []):
print(f"File: {obj['Key']}, Size: {obj['Size']}")# Azure: Local Python Script (Azure Identity SDK)
from azure.identity import DefaultAzureCredential
from azure.storage.filedatalake import DataLakeServiceClient
# DefaultAzureCredential automatically checks:
# 1. AZURE_CLIENT_ID / AZURE_CLIENT_SECRET env vars
# 2. Managed Identity (if in Azure)
# 3. Local 'az login' session on your machine!
credential = DefaultAzureCredential()
client = DataLakeServiceClient("https://mylakeaccount.dfs.core.windows.net", credential=credential)
fs = client.get_file_system_client("curated")
for path in fs.get_paths(path="orders/2026"):
print(f"File: {path.name}, Size: {path.content_length}")5. Paradigm Shift Gotchas: Traps to Avoid in AZURE
Management Plane vs. Data Plane Role Split
In AWS, PowerUserAccess allows reading S3. In Azure, Contributor only allows managing Azure resources. Reading data strictly requires Storage Blob Data Contributor.
Always grant Storage Blob Data Contributor for data lake automation scripts.
6. Test Your Mental Model
Quick Knowledge Check: Test Your AZURE Mental Model
Solidify your cross-cloud understanding with instant feedback.