amazon-quicksight-embedding-sdk | A SDK to help users embed QuickSight dashboards on other pages | AWS library
kandi X-RAY | amazon-quicksight-embedding-sdk Summary
kandi X-RAY | amazon-quicksight-embedding-sdk Summary
Thank you for using the Amazon QuickSight JavaScript SDK. You can use this SDK to embed Amazon QuickSight in your HTML.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the URL of the iframe source
- Creates an iframe with the given options
- Unsubscribes an event from an event listener .
- Use the query string parameters to be used in URL .
- Attach an iframe element .
- sends a single post message to the iframe
- Registers an event .
- Embed a query bar .
- Throws an error if not on reserved keywords
- Fires event for an event .
amazon-quicksight-embedding-sdk Key Features
amazon-quicksight-embedding-sdk Examples and Code Snippets
Community Discussions
Trending Discussions on amazon-quicksight-embedding-sdk
QUESTION
I have embedded Amazon QuickSight dashboard in my web application by using amazon-quicksight-embedding-sdk (followed https://learnquicksight.workshop.aws/en/dashboard-embedding.html).
The user session seems to last many hours as mentioned in https://docs.aws.amazon.com/quicksight/latest/APIReference/API_GetDashboardEmbedUrl.html When I requested the embed URL directly from my web browser, I could see that it was valid for many hours.
But my web app will request a new embed URL when user restarts it (by closing/reopening tab/browser). Does that mean a new user session was created and billed.
Is it possible to store the embed URL and to reuse it (as long as the user session lasts) for the case the same user closes the tab/browser and open the web app and the dashboard again (of course in the same browser)?
I tried to store the embedURL as a cookies named "embed_url". But calling amazon-quicksight-embedding-sdk.embedDashboard({url: embed_url}) resulted in
"Embedding failed because of invalid URL or authorization code. Both of these must be valid and the authorization code must not be expired for embedding to work."
I was sure the embed_url was still valid because requesting it by the browser directly worked. Which "authorization code" is mentioned in the above error message? What did I miss or is it actually not possible?
Beside the billing concern, I've noticed that the call to get the embedURL took time (more than 5 seconds, eu-central-1) while the embedding took less (3 seconds). I thought I could improve the dashboard loading time by reusing the gotten embedURL. Any comments about the timing? Is it normal or did I do something wrong so that it was so slow? My test dashboard has only 1 diagram with unchanged dataset.
...ANSWER
Answered 2021-Jun-03 at 05:43As per the Quicksight Pricing Page, if you're creating an embedded dashboard for a Quicksight "Reader", then you're paying $0.30/session per 30-minute logged-in-session for this Reader.
The validity of the session can be set in the SessionLifetimeInMinutes
parameter of the GetDashboardEmbedUrl
API, and has an upper bound of 600 minutes (10 hours).
As an example, suppose you set SessionLifetimeInMinutes
to 600 mins for your Reader user. Also suppose that this user stayed logged in and uses the dashboard for 10 hours continuously, then that would equate to 20 sessions of usage (since the billing is in increments of 30-min chunks). At first glance it would seem that this would cause $0.30/session * 20 session-chunks = $6 to be billed.
However, as per the pricing page, there is an upper bound of $5.00 per month for every Reader. Which means that this Reader can never exceed $5 per month regardless of how many Quicksight sessions (of whatever duration) are created for them. So no matter how many times you call the GetDashboardEmbedUrl
API for a given Reader, you're capped to $5/month for this user.
Also of use as to what constitutes a Reader session (from the pricing page):
QUESTION
I have successfully generated a QuickSight Dashboard url but when I try to use quicksight-embedding-sdk to embed my dashboard in my Amplify app the div containing the embedded dashboard will not display the dashboard but instead an error.
In Chrome it is: "us-east-1.quicksight.aws.amazon.com refused to connect."
With these "Issues":
...ANSWER
Answered 2020-Sep-02 at 21:11I tried
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install amazon-quicksight-embedding-sdk
You use a different SDK object for each embedded QuickSight experience. You use embedDashboard to embed a dashboard, and you use embedSession to embed an authoring portal.
You use a different API for each embedded experience. For more information, see QuickSight Embedding APIs
Different options are supported for each embedded experience.
Embedded dashboards are always read-only. The level of interactivity is set when the dashboard is published.
Embedded authoring ports allow the user to create QuickSight assets, just like they can in the AWS console for QuickSight. Exactly what the user can do in the console is controlled by a custom permission profile. The profile can remove abilities such as creating or updating data sources and datasets. You can set also the default visual type. Embedded consoles currently don't support screen scaling in formatting options.
Do ONE of the following:.
Option 1: Use the Amazon QuickSight Embedding SDK in the browser:
Option 2: Install and use the QuickSight Embedding SDK in Node.js:
If you want your application to get notified and respond when the Amazon QuickSight dashboard is fully loaded, use a load callback. Choose one of the following:.
Use options:
Or, register the "load" event on the returned dashboard object:
If you want your application get notified and respond when the embedded QuickSight session fails to load, use a error callback. Choose one of the following:.
Use options:
Or, register the "error" event on the returned dashboard object:
To register the "error" event on the returned console session object:
Forbidden -- the URL's authentication code expired
Unauthorized -- the session obtained from the authentication code expired
If you want your application to get notified and respond when the parameters in Amazon QuickSight dashboard changes, use the parameter change callback. Choose one of the following:.
Use options:
Or, register the "parametersChange" event on the returned dashboard object:
If you want your application to get notified and respond when the selected sheet in Amazon QuickSight dashboard changes, use the selected sheet change callback. Choose one of the following:.
Use options:
Or, register the "selectedSheetChange" event on the returned dashboard object:
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page