Day 82 of 90 Days of DevOps Challenge: Identity & Access Management


Yesterday, I explored Amazon Route 53, AWS’s highly available and scalable DNS (Domain Name System) service, which makes routing user requests reliable and intelligent. It was fascinating to see how Route 53 plays a critical role in directing internet traffic securely and efficiently.
Today, I’m focusing on AWS IAM (Identity and Access Management), a service that keeps AWS secure by controlling who can access what resources and what actions they can perform. My goal was to understand IAM deeply so I can design AWS environments that are both safe and efficient.
What is AWS IAM?
AWS IAM is a global service that enables you to manage access to AWS resources securely. With IAM, you define:
Who can access your AWS account (Users, Groups, Roles)
What they can do (Permissions & Policies)
Which resources they can use (Resource-level permissions)
IAM is free to use; you only pay for the AWS resources your identities access.
Why Do We Need IAM?
In any AWS setup, security and access control are non-negotiable. Without IAM, everyone would either have too much access (risking accidental or malicious changes) or too little (slowing down work).
IAM provides fine-grained control so you can:
Restrict access to sensitive resources
Enforce least privilege (grant only the permissions needed)
Separate duties between teams (e.g., developers vs. admins)
Meet compliance and audit requirements
Core Components of IAM
Users
Individual identities in your AWS account, representing people or applications.
Have long-term credentials (username/password, access keys).
Groups
Collections of IAM users that share permissions.
Useful for assigning the same policies to multiple users.
Roles
Identities with temporary credentials used by AWS services, applications, or federated users.
Examples: An EC2 instance role, a Lambda execution role.
Policies
JSON documents that define permissions.
Two main types:
AWS Managed Policies → Prebuilt by AWS.
Customer Managed Policies → Created by you for custom needs.
Identity Providers (IdP)
- Integrate with corporate directories or third-party authentication (e.g., Okta, Active Directory, SAML).
IAM Policy Structure
An IAM policy has these main elements:
Effect → Allow or Deny
Action → The API calls permitted or denied (
s3:PutObject
,ec2:StartInstances
)Resource → Specific AWS resources the action applies to
Condition → Optional, fine-tunes when the policy applies (e.g., IP range, MFA required)
Example:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::my-bucket"
}
]
}
Best Practices for IAM
Enforce Least Privilege → Grant only what’s necessary.
Enable MFA for all privileged accounts.
Rotate credentials regularly.
Use roles instead of long-term access keys.
Monitor activity with IAM Access Analyzer and CloudTrail.
Where is IAM Used?
User Management → Creating AWS accounts for team members.
Service Access Control → EC2 instances accessing S3 without embedding credentials.
Cross-Account Access → Share resources securely across AWS accounts.
Federation → Let corporate users log in using existing credentials.
Compliance & Auditing → Prove who did what and when for security audits.
Coating (Integration with AWS)
IAM is deeply integrated with almost every AWS service. Whether you’re launching an EC2 instance, running a Lambda function, or storing data in S3, IAM defines who can do what.
IAM also works closely with AWS Organizations to manage permissions across multiple AWS accounts, and with CloudTrail to log every access attempt for auditing.
Final Thoughts
AWS IAM is the gatekeeper of your AWS environment. It ensures the right people and services have the right access at the right time, nothing more, nothing less.
Mastering IAM isn’t just about writing policies; it’s about building a culture of security. By combining least privilege, role-based access, MFA, and auditing, you can make your AWS setup both safe and smooth to operate. In cloud environments, good IAM design is the foundation everything else rests on.
Tomorrow, I’ll explore SNS & SQS, two messaging services that help decouple and scale applications.
Subscribe to my newsletter
Read articles from Vaishnavi D directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
