0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS CLI で IAM ユーザーを作る方法

Last updated at Posted at 2017-07-28

ref:

以下のコマンドでユーザーの作成が行える

$ aws iam create-user \
    --user-name sampleuser
{
    "User": {
        "UserName": "sampleuser",
        "Path": "/",
        "CreateDate": "2017-07-01T00::00Z",
        "UserId": "userId",
        "Arn": "arn:aws:iam::account-id-without-hyphens:user/sampleuser"
    }
}

作成したユーザーをグループに追加する場合は

 $ aws iam add-user-to-group \
    --user-name sampleuser \
    --group-name Developers

AWS Console でログインできるようにするには

$ aws iam create-login-profile \
    --user-name sampleuser \
    --password 'hogehoge' \
    --password-reset-required
{
    "LoginProfile": {
        "UserName": "sampleuser",
        "CreateDate": "2017-07-01T00::00Z",
        "PasswordResetRequired": true
    }
}

--password-reset-required をつけることで初回ログイン時にパスワード再設定が求められるようになる

aws cli などで API アクセスも行う場合は

$ aws iam create-access-key \
    --user-name sampleuser
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?