Embedding Workflow

Dynamic site

In this sample, we will use API gateway to serve out an HTML page (API Gateway and lambda is simulating your web server. In your prod environment, you can implement same concept on your existing web server.)

We will launch API gateway url from browser. This executes a Lambda function which in turn will make a GetDashboardEmbedUrl call to QuickSight.

We need to provide this Lambda function the required permissions to create anonymous embed urls.

DWF
QuickSight returns an embed url for the primary dashboard included in the request. It is also authorized to launch additional dashboards included in the request. Lambda includes this dynamic url in a wrapper HTML file and returns this HTML page to browser via API Gateway.
DWF
Dashboard content is pulled directly from QuickSight and displayed. When user selects any of the additional dashboards to view, navigateToDashboard function from QuickSight JavaScript library is used to launch the dashboard. We do not need to generate another embed url.

Note - We are able to do this for dashboards that were included in initial GetDashboardEmbedUrl call as additional dashboards when using anonymous embedding.

DWF

Static site

In this sample, we will use API Gateway to serve out a static web page. (API Gateway and Lambda are simulating a static content server. You can use S3/S3+CloudFront instead as well.)
SWF
Once the static page loads, JavaScript function therein invokes API Gateway. This executes a Lambda function which in turn will make a GetDashboardEmbedUrl call to QuickSight.

We need to provide this Lambda function the required permissions to create anonymous embed urls.

SWF
QuickSight returns an embed url for the primary dashboard included in the request. It is also authorized to launch additional dashboards included in the request. Lambda passes this url wrapped in JSON format to browser via API Gateway.
SWF
The embed url received from API Gateway is passed to embedDashboard function (included in QuickSight Javascript library). This embeds the url into the identified div, pulls in content from QuickSight and displays the dashboard. When user selects any of the additional dashboards to view, navigateToDashboard function from QuickSight JavaScript library is used to launch the dashboard. We do not need to generate another embed url.

Note - We are able to do this for dashboards that were included in initial GetDashboardEmbedUrl call as additional dashboards when using anonymous embedding.

SWF