LoginSignup
0
0

More than 5 years have passed since last update.

Opsworks コマンドによるPermissionユーザ登録

Posted at

1. arn 情報の作成

arnは、アカウントIDと、IAMユーザ名があれば作成できる。

以下の形でarnを作成する。
arn:aws:iam::<アカウントID>:user/<IAMユーザ名>

2. SSHキーの作成

$ ssh-keygen -t rsa -C "<ユーザ名>" -f ./<出力ファイル名>.pem

passwordを2回入力して設定する。

$ ssh-keygen -t rsa -C "taro" -f ./taro.pem
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in ./taro.pem.
Your public key has been saved in ./taro.pem.pub.
The key fingerprint is:
a7:79:fa:bc:4e:47:2b:df:2e:f3:4c:26:42:b1:32:c5 taro
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|         .       |
|          E      |
|         . o     |
|        S + .    |
|         B . .   |
|        o = + o  |
|         = =o*   |
|        .o=..==  |
+-----------------+
$ ls taro*
taro.pem  taro.pem.pub

<出力ファイル名>.pem
<出力ファイル名>.pem.pub
が作成される.

3. ユーザ情報更新

aws opsworks update-user-profile \
--region us-east-1 \
--iam-user-arn arn:aws:iam::719778162096:user/taro \
--ssh-username taro \
--ssh-public-key "ssh-rsa AAaaaaaaaaaaaaaaaa4jvMC/prbbbbbbbbbbbbbbb== taro" //2で作成した<出力ファイル名>pem.pubの内容

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