2
0

More than 3 years have passed since last update.

QuickSightのReaderユーザー作成

Last updated at Posted at 2020-05-23

Readerユーザーとは

QuickSightのユーザーの種類で閲覧用のユーザーです。ダッシュボードの閲覧ができますが、それだけでなく、データのドリルダウン, フィルタ設定の変更と適用, CSVでデータのダウンロードなどの操作ができます。QuickSightの管理や分析の作成は管理者でなければできません。

QuickSightでReaderユーザーを作成

ユーザー定義JSONファイルを作り、そのファイルを指定してregisterUserのAPIを使いユーザーを作成します

ユーザー定義JSON作成

register-prod-reader1.jsonというファイルを作成します。これはQuickSightユーザーの種類, メールアドレス, ユーザー名などを定義しています。
※メールアドレスは任意のものに置き換えます。

register-prod-reader1.json

{
    "IdentityType": "QUICKSIGHT",
    "Email": "prod-reader1@test.com",
    "UserRole": "READER",
    "AwsAccountId": "<your aws account>",
    "Namespace":"default",
    "UserName": "prod-reader1"
}

Readerユーザー作成

次のコマンドを実行し、Readerユーザーを作成します。

$ aws quicksight register-user --cli-input-json file://register-prod-reader1.json

以下のような出力があれば成功です。
各ユーザーのUserInvitationUrl値を書き留めます。この後のユーザー登録のために使います。

{
    {
    "Status": 201,
    "RequestId": "57431e4f-1c23-4026-9fe5-e3609388d007",
    "User": {
        "UserName": "prod-reader1",
        "PrincipalId": "user/d-906706bd27/b003efc4-ff2e-4c47-97a7-255a1f16fb13",
        "Role": "READER",
        "Active": false,
        "Email": "prod-reader1@test.com",
        "Arn": "arn:aws:quicksight:us-east-1:<your aws account>:user/default/prod-reader1"
         },
    "UserInvitationUrl": "https://signin.aws.amazon.com/inviteuser?token=11yC6lblMtp17A5Izt3XQA0VeHGgtvu1mvaFnEZvwsuPFi-k1rWf5g9dqzZu0W0Ugx6nmuXaIk4SQub0gB09XO8RuGPn-MomVJtYOngNU54VMJiO5C4sOxo-RaTlj5R3w63BnWB0z_WV6b--A849K1irTm1GgBms5wm8_ZwjXUHLg1fqbakuU_Z71CYwx8ZfYTwzfywqJ9gkD6pw"
    }
}

Readerユーザーの登録完了処理

先程書き留めたprod-reader1のUserInvitationUrlの値(URL)をブラウザで開きます。表示される画面でパスワードを設定しサインインします。このURLは、ユーザーの登録の完了とパスワード設定を提供します(※UserInvitationUrlはIAMユーザーでもActive DirectoryユーザーでもないQuickSightユーザーを作成した場合に提供され、そのユーザーはサインインしてパスワードを入力するまで非アクティブになっています) 。

Readerグループ作成

Readerグループを作成します。


$ aws quicksight create-group --aws-account-id <your aws account> --namespace 'default' --group-name 'dashboard-readers'

ReaderグループにReaderユーザーを割り当てます。

$ aws quicksight create-group-membership --aws-account-id <your aws account> --namespace 'default' --group-name 'dashboard-readers' --member-name 'prod-reader1'
2
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
2
0