Last active
August 29, 2015 14:18
-
-
Save maimai-swap/59d42901988e30a6408c to your computer and use it in GitHub Desktop.
aws cli でのiamユーザー作成 ref: http://qiita.com/maimai-swap/items/749642b54160443e6a1f
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
AWS_PROFILE_NAME=test # 作りたいところのプロフィール名 | |
USER_NAME=test-user # ユーザー名 | |
PASSWORD=iD8Bkcd4-JrxUXQ5v # 初期パスワード | |
GROUP_NAME=developer # グループ名 先にiamで作っとく必要あります。 |
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
aws iam create-user \ | |
--user-name $USER_NAME \ | |
--path / \ | |
--profile $AWS_PROFILE_NAME |
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
{ | |
"User": { | |
"UserName": "ユーザー名", | |
"Path": "/", | |
"CreateDate": "2015-04-03T04:00:19.899Z", | |
"UserId": "文字列", | |
"Arn": "arn:aws:iam::AWSアカウントID:user/ユーザー名" | |
} | |
} |
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
aws iam create-login-profile \ | |
--user-name $USER_NAME \ | |
--password $PASSWORD \ | |
--password-reset-required \ | |
--profile $AWS_PROFILE_NAME |
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
{ | |
"LoginProfile": { | |
"UserName": "ユーザー名", | |
"CreateDate": "2015-04-03T04:00:21.142Z", | |
"PasswordResetRequired": true | |
} | |
} |
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
aws iam add-user-to-group \ | |
--group-name $GROUP_NAME \ | |
--user-name $USER_NAME \ | |
--profile $AWS_PROFILE_NAME |
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
aws iam create-access-key \ | |
--user-name $USER_NAME \ | |
--profile $AWS_PROFILE_NAME |
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
{ | |
"AccessKey": { | |
"UserName": "ユーザー名", | |
"Status": "Active", | |
"CreateDate": "2015-04-03T04:10:43.927Z", | |
"SecretAccessKey": "シークレットキー", | |
"AccessKeyId": "アクセスキー" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment