IAM users represent individuals or services that need access to AWS resources. Each user has unique credentials.
- Credentials: Users have passwords and access keys.
- Permissions: Permissions are usually managed via groups.
-
Create a User:
aws iam create-user --user-name Alice
-
Assign a Policy to a User:
aws iam attach-user-policy --user-name Alice --policy-arn arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess
-
Create a User:
- Sign in to the AWS Management Console.
- Open the IAM console at IAM Dashboard.
- In the navigation pane, click Users.
- Click Add user.
- Enter a User name, select Access type (e.g., Programmatic access and/or AWS Management Console access).
- Click Next: Permissions.
- Set permissions as needed and click Next: Tags.
- (Optional) Add tags and click Next: Review.
- Click Create user.
-
Assign a Policy to a User:
- In the IAM console, go to Users.
- Select the user you want to modify.
- Click the Permissions tab.
- Click Add permissions.
- Choose Attach policies directly.
- Search for and select the policy (e.g., AmazonS3ReadOnlyAccess).
- Click Next: Review, then Add permissions.
Next: AWS IAM Groups