AWS IAM (Identity and Access Management) is the service that controls who (authentication) can do what (authorization) in your AWS account. Letting a developer read only a specific S3 bucket, letting an EC2 server write to DynamoDB without storing a password, or letting the accounting team see only invoices are all configured with IAM. There is no additional charge for IAM itself.
Core IAM Concepts
| Concept | What it is for |
|---|---|
| Root user | The all-powerful identity created with the email you signed up with. It shouldn’t be used for everyday tasks. |
| IAM user | An identity for a person or application with long-term credentials (password, access keys). |
| IAM group | A group used to grant permissions to users collectively (for example “Developers”). |
| IAM role | An identity with no permanent password, assumed with temporary credentials. Services such as EC2 and Lambda, and users from external identity providers, use roles. |
| Policy | A JSON document that defines which actions (Action) on which resources (Resource) under which conditions (Condition) are allowed or denied. |
An Example IAM Policy
The policy below only allows listing and reading files in the S3 bucket named example-backups; it grants no access to any other bucket or action:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListBucket"],
"Resource": "arn:aws:s3:::example-backups"
},
{
"Effect": "Allow",
"Action": ["s3:GetObject"],
"Resource": "arn:aws:s3:::example-backups/*"
}
]
}In IAM the default is “no access”; an action is possible only if a policy explicitly allows it. An explicit Deny statement always overrides any allow.
IAM Security Practices AWS Recommends
The main recommendations from AWS’s IAM security best practices page are:
- Protect the root user: Don’t use the root account for daily work; protect it with a strong password and MFA.
- Require MFA: Where possible, use phishing-resistant MFA such as passkeys or security keys.
- Temporary credentials for people: Have human users access AWS through an identity provider (for example IAM Identity Center) with temporary credentials.
- Roles for workloads: Assign IAM roles to applications running on EC2 or Lambda instead of giving them access keys; AWS supplies temporary credentials automatically.
- Least privilege: Grant only the permissions the job requires. Start with AWS managed policies and move toward your own narrower policies over time; IAM Access Analyzer can generate policies based on actual usage.
- Remove what isn’t used: Use last accessed information to regularly remove unused users, roles, keys and policies.
- Use conditions: For example, add conditions that require requests to use TLS.
- Keep long-term keys up to date: If access keys are unavoidable (for example for a tool outside AWS), update them when needed and revoke them immediately when an employee leaves.
A Short Checklist for Initial Setup
- Add MFA to the root user and don’t create root access keys.
- Create a separate administrator identity with MFA for admin work (preferably through IAM Identity Center).
- Split teams into groups and grant permissions to the groups.
- Assign roles to your servers and functions instead of access keys.
- Never commit access keys to a code repository (for example GitHub).
For the services where IAM roles are used most, see our articles on Amazon EC2, Amazon S3, AWS Lambda and Amazon RDS. The same logic applies to your own server: using a sudo user and SSH keys instead of root is the foundation of VDS server security.
Conclusion
AWS IAM uses users, groups, roles and JSON policies to define who can access what in your AWS account. Protecting the root user, requiring MFA, using roles and temporary credentials instead of long-term keys, and following least privilege are the foundations of your AWS account’s security.
Categories
-
CentOS 7 guides
-
cPanel 20 guides
-
CyberPanel 18 guides
-
Operating Systems 81 guides
-
Juniper Networks 18 guides
-
Control Panels 50 guides
-
Linux 17 guides
-
MySQL 29 guides
-
Network 95 guides
-
Plesk Panel 12 guides
-
Virtual Servers 273 guides
-
SEO 3 guides
-
Cyber Security 8 guides
-
Technology 162 guides
-
VMware 36 guides
-
WordPress 20 guides
-
Artificial Intelligence 22 guides