My identity region is ‘us-east-1’ where users and groups are defined. I prepared new dashboard in region ‘us-east-2’ and I am trying to get embed URL of this dashboard by calling API generate_embed_url_for_registered_user(), but I cannot access to this dashboard.
How to access a dashboard of which region is ‘us-east-2’ different from identity region ‘us-east-1’?
Hi @Alpay1
You can create different clients to access/modify resources in different regions. For example,
quicksight_useast1 = boto3.client('quicksight', region_name='us-east-1')
The above client can be used to create/modify users in the Identity Region us-east-1. Whereas, you can create a new client in us-east-2 to access the Dashboards or generate an embed URL.
quicksight_dashboard = boto3.client('quicksight', region_name='us-east-2')
Hi, thank you for reply. I tried exactly as you indicated but it did not work. I used two different quicksight client, client instance with ‘us-east-2’ cannot access to my dashboard in ‘us-east-2’ region.
I implemented embed sample in Amazon QuickSight - All aspects [QuickSight Workshops], this workshop sample did not work for my case as I stated above. Any idea ?
Should I also supply access Key and Secret key as parameter as instantiating quicksight_dashboard = boto3.client(‘quicksight’, region_name=‘us-east-2’) ?
code snippet is here: this works when I define identity region is ‘us-east-1’ and dashboard region is ‘us-east-1’
but it does not work when I give identity region is ‘us-east-1’ and dashboard region is ‘us-east-2’ for accessing dashboard created in ‘us-east-2’ region ::
quickSightIdentity = boto3.client(‘quicksight’,region_name= identityRegion)
quickSight = boto3.client(‘quicksight’,region_name= dashboardRegion)
response = quickSight.(
AwsAccountId = awsAccountId,
UserArn = ‘arn:aws:quicksight:’+ identityRegion + ‘:’ + awsAccountId + ‘:user/default/’ + roleName + ‘/’ + userName,
SessionLifetimeInMinutes = adjustedSessionDuration,
ExperienceConfiguration = {‘Dashboard’:{‘InitialDashboardId’: DashboardID}}
correct the missing call:
response = quickSight.generate_embed_url_for_registered_user(
AwsAccountId = awsAccountId,
UserArn = ‘arn:aws:quicksight:’+ identityRegion + ‘:’ + awsAccountId + ‘:user/default/’ + roleName + ‘/’ + userName,
SessionLifetimeInMinutes = adjustedSessionDuration,
ExperienceConfiguration = {‘Dashboard’:{‘InitialDashboardId’: DashboardID}}
)