AWS获取嵌入式仪表板URL

时间:2019-07-04 04:07:33

标签: amazon-web-services amazon-quicksight quicksight-embedding

我正在尝试使用cli检索嵌入式的Quicksight仪表板URL。 但是,我不断收到错误QuickSightUserNotFoundException

我正在按照本指南检索网址link

步骤:

aws sts assume-role --role-arn "<ARN>" --role-session-name testsession

返回

{
    "Credentials": {
        "AccessKeyId": "<KEY>",
        "SecretAccessKey": "<KEY>",
        "SessionToken": "<TOKEN>",
        "Expiration": "2019-07-04T04:54:21Z"
    },
    "AssumedRoleUser": {
        "AssumedRoleId": "<ID>:testsession",
        "Arn": "<ARN>/testsession"
    }
}

然后我执行

aws quicksight get-dashboard-embed-url --aws-account-id <ID> --dashboard-id <ID> --identity-type IAM

返回错误

An error occurred (QuickSightUserNotFoundException) when calling the GetDashboardEmbedUrl operation: Could not find user information in QuickSight

现在假设用户不属于QuickSight,我执行以下命令以添加用户

aws quicksight register-user --aws-account-id <ID> --namespace default --identity-type IAM --iam-arn "<ARN>" --user-role READER --session-name "testsession" --email user123@example.com --region us-east-1

返回

{
    "Status": 201,
    "User": {
        "Arn": "<ARN>/testsession",
        "UserName": "<NAME>/testsession",
        "Email": "user123@example.com",
        "Role": "READER",
        "Active": false,
        "PrincipalId": "<ID>"
    },
    "RequestId": "<ID>"
}

现在再次尝试从中获取url,我仍然遇到相同的错误...

1 个答案:

答案 0 :(得分:0)

您是否为QuickSight用户创建了策略并将其附加到该策略? 您可以通过运行以下命令来检查QuickSight上允许的用户:

aws quicksight list-users --aws-account-id <account-id> --namespace default --region <region-name>

这将列出所有被允许使用和访问您的QuickSight实例的用户。

此外,请查看有关嵌入QuickSight Analytics的最新博客:

https://aws.amazon.com/blogs/big-data/embed-multi-tenant-analytics-in-applications-with-amazon-quicksight/