Created
June 17, 2019 14:55
-
-
Save altairlage/8bc0f4cfc82cb12273af8a34b40b540d to your computer and use it in GitHub Desktop.
How to create and AWS IAM user via CLI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Create user | |
aws iam create-user --user-name <username> | |
- Create login profile (to allow AWS Console access) | |
aws iam create-login-profile --user-name <value> --password <value> --password-reset-required | |
- Create access key (for programatic access) | |
aws iam create-access-key --user-name <username> | |
- Add user to group | |
aws iam add-user-to-group --group-name <group name> --user-name <username> | |
check if user was added: | |
aws iam get-group --group-name <groupname> | |
- Attach policy (Optional. Use if you want to set some permissions or attach to a role that isn't in the group) | |
aws iam attach-user-policy --policy-arn <policy arn> --user-name <username> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment