Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

0
0

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 3 years have passed since last update.

IAMユーザーのCodeCommit Git 認証情報をcliで作成する

Posted at

Git認証情報をcliで作成したいのだが、公式サイトにコマンドが見当たらず(見つけられず)直接問い合わせをした結果を共有。

Git認証情報作成コマンド

aws iam create-service-specific-credential --user-name <メールアドレス> --service-name codecommit.amazonaws.com

上記コマンドでGit認証情報を作成できる。
ついでにcodecommit用のIAMポリシーも作成。

CodeCommitFullaccessのIAMポリシー

aws iam attach-user-policy --user-name <メールアドレス> --policy-arn arn:aws:iam::aws:policy/AWSCodeCommitFullAccess

cliでユーザーを作成した時はコンソールログイン権限とkey/secは発行されないので、
必要な場合は別途要作成

$ aws iam create-user --user-name <メールアドレス>
{
    “User”: {
        “UserName”: “hogehoge”,
        “Path”: “/”,
        “CreateDate”: “********”,
        “UserId”: “********”,
        “Arn”: “arn:aws:iam::********:user/hogehoge”
    }
}

これらをいい感じにscript化すればユーザー作成がサクッと出来る。

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?