joemc88
joemc88

Reputation: 61

"'userArn' failed to satisfy constraint: Specified Resource is not reachable in this region" when requesting quicksight embed URL

I am attempting to embed a Quicksight dashboard in a web-app and have been using this amazon-quicksight-embedding-sample to get up and running. I followed all the instruction in the README and have the code running in my AWS lambda function. When I test the code it returns null and the logs report the ValidationException in the title. The expected output is a URL for embedding the dashboard in a webpage.
Actual output is as follows:

ValidationException: 1 validation error detected: Value 'arn:aws:iam::655956663811:user/admin' at 'userArn' failed to satisfy constraint: Specified resource is not reachable in this region ('us-east-2')
at Object.extractError (/var/task/node_modules/aws-sdk/lib/protocol/json.js:51:27)
at Request.extractError (/var/task/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8)
at Request.callListeners (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/var/task/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/var/task/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/var/task/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/var/task/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /var/task/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/var/task/node_modules/aws-sdk/lib/request.js:685:12)

The user 'Admin' is an IAM user with Administrator Access and the quicksight account has whitelisted embedding for amazonaws.com and amazon.com. The test input for the lambda is:

{
"dashboardId": "311d89d1-d666-4fb1-91cf-1500e28b76ca",
"userArn": "arn:aws:iam::<accountID>:user/admin",
"apiGatewayUrl": "bypassed for lambda testing",
"resetDisabled": "false",
"undoRedoDisabled": "false"
}

What am I doing wrong?

Upvotes: 6

Views: 3368

Answers (1)

K. Marko
K. Marko

Reputation: 141

Try like this:

aws quicksight describe-user --user-name --aws-account-id <account_id> --namespace default --region

And then use Arn from this response.

Upvotes: 11

Related Questions