Hi Team,
We are attempting to programmatically download a dashboard from Amazon QuickSight using Python (boto3). However, we are encountering the following error when invoking the StartDashboardSnapshotJob API:
Error:
AccessDeniedException: IdentityStore not found or unauthorized for account. Verify IdentityStore exists and credentials have proper permissions.
We are currently using an IAM role with the following permissions:
“Action”: [
“quicksight:GetDashboardEmbedUrl”,
“s3:*”,
“quicksight:DescribeUser”,
“quicksight:*”,
“identitystore:*”,
“quicksight:ListUsers”,
“glue:*”
],
Additionally, the Paginated Reports (Pixel-perfect reporting) feature has been enabled in our account.
Could anyone please help us understand what needs to be done further.
this is my sample code:
import time
import boto3
session = boto3.Session(profile_name='xxx')
client = session.client('quicksight', region_name='us-east-1')
ACCOUNT_ID = 'xxx'
DASHBOARD_ID = 'xxx'
OUTPUT_S3_BUCKET = 'xxx'
OUTPUT_S3_PREFIX = 'quicksight-exports'
OUTPUT_S3_REGION = 'us-east-1'
snapshot_response = client.start_dashboard_snapshot_job(
AwsAccountId='xxx',
DashboardId=DASHBOARD_ID,
SnapshotJobId=f'snapshot-{int(time.time())}',
UserConfiguration={
"AnonymousUsers": [
{}
]
},
SnapshotConfiguration={
"FileGroups": [
{
"Files": [
{
"SheetSelections": [
{
"SheetId": "xxx",
"SelectionScope": "ALL_VISUALS"
}
],
"FormatType": "PDF"
}
]
}
],
"DestinationConfiguration": {
"S3Destinations": [
{
"BucketConfiguration": {
"BucketName": OUTPUT_S3_BUCKET,
"BucketPrefix": OUTPUT_S3_PREFIX,
"BucketRegion": OUTPUT_S3_REGION
}
}
]
}
}
)