Boto3 deploy dashboard with link to analysis

Hi,

There are 2 approaches
It depends on how many dashboard instances you want to launch with this analysis.

If only 1 analysis and 1 dashboard, Then you can create a dashboard from analysis through boto3.quicksight.create_dashboard

For this, you will need arn of the analysis and all datasets you are using for the analysis,
And create a dashboard.

This method expects you to provide dashboard-id,
So you can generate id with uuid in python and store in the DB/ settings/environment depending on how your app is configured.
This method also lets you pass the who it needs to be shared with info too.

Now, whenever in the future when you want to update the dashboard from analysis, you can delete the current dashboard with boto3.Quicksight.delete_dashboard and create a new dashboard, where your dashboard id is the same as the previous one, this way you don’t have to worry about providing a new link to users (who it is shared with) or update iframe if your embedding the dashboard.

2nd approach

If there are multiple dashboards with the same analysis with diff datasets (client respective)

Then create a template from analysis using boto3 and, then do everything the same as 1st approach, but use template arn instead of analysis arn.

Let me know if you need further details

2 Likes