id
stringlengths 8
78
| source
stringclasses 743
values | chunk_id
int64 1
5.05k
| text
stringlengths 593
49.7k
|
---|---|---|---|
amazon-quicksight-user-393 | amazon-quicksight-user.pdf | 393 | url; try { url = await myGetEmbedUrl(MY_DASHBOARD_ID); } catch (error) { console.log("Obtaining an embed url failed"); } if (!url) { return; } // 2. Create embedding context const embeddingContext = await createEmbeddingContext(); // 3. Embed the dashboard const embeddedDashboard = await embeddingContext.embedDashboard( { url, container: MY_DASHBOARD_CONTAINER, width: "1200px", height: "300px", resizeHeightOnSizeChangedEvent: true, }, { onMessage: async (messageEvent) => { const { eventName, message } = messageEvent; switch (eventName) { case "CONTENT_LOADED": { Embedding custom assets 1423 Amazon QuickSight User Guide await myAddVisualActionOnFirstVisualOfFirstSheet(embeddedDashboard); break; } case "CALLBACK_OPERATION_INVOKED": { myCustomDatapointCallbackWorkflow(message); break; } } }, } ); }; main().catch(console.error); You can also configure the preceding example to initiate datapoint callback when the user opens the context menu. To do this with the preceding example, set the value of actionTrigger to ActionTrigger.DATA_POINT_MENU. After a datapoint callback is registered, it's applied to most datapoints on the specified visual or visuals. Callbacks don't apply to totals or subtotals on visuals. When a reader interacts with a datapoint, a CALLBACK_OPERATION_INVOKED message is emitted to the QuickSight embedding SDK. This message is captured by the onMessage handler. The message contains the raw and display values for the full row of data associated with the datapoint that is selected. It also contains the column metadata for all columns in the visual that the datapoint is contained in. The following is an example of a CALLBACK_OPERATION_INVOKED message. { CustomActionId: "custom_action_id", DashboardId: "dashboard_id", SheetId: "sheet_id", VisualId: "visual_id", DataPoints: [ { RawValues: [ { String: "Texas" // 1st raw value in row }, { Integer: 1000 // 2nd raw value in row } ], Embedding custom assets 1424 Amazon QuickSight User Guide FormattedValues: [ {Value: "Texas"}, // 1st formatted value in row {Value: "1,000"} // 2nd formatted value in row ], Columns: [ { // 1st column metadata Dimension: { String: { Column: { ColumnName: "State", DatsetIdentifier: "..." } } } }, { // 2nd column metadata Measure: { Integer: { Column: { ColumnName: "Cancelled", DatsetIdentifier: "..." }, AggregationFunction: { SimpleNumericalAggregation: "SUM" } } } } ] } ] } Filtering data at runtime for QuickSight embedded dashboards and visuals You can use filter methods in the Amazon QuickSight embedding SDK to leverage the power of QuickSight filters within your software as a service (SaaS) application at runtime. Runtime filters allow business owners to integrate their application with their embedded QuickSight dashboards and visuals. To accomplish this, create customized filter controls in your application and apply filter presets based on data from your application. Then, developers can personalize filter configurations for end users at runtime. Embedding custom assets 1425 Amazon QuickSight User Guide Developers can create, query, update, and remove QuickSight filters on an embedded dashboard or visual from their application with the QuickSight Embedding SDK. Create QuickSight filter objects in your application with the FilterGroup data model and apply them to embedded dashboards and visuals using the filter methods. For more information about using the QuickSight Embedding SDK, see the amazon-quicksight-embedding-sdk on GitHub. Prerequisites Before you can get started, make sure that you are using the QuickSight Embedding SDK version 2.5.0 or higher. Terminology and concepts The following terminology can be useful when working with embedded runtime filtering. • Filter group – A group of individual filters. Filters that are located within a FilterGroup are OR- ed with each other. Filters within a FilterGroup are applied to the same sheets or visuals. • Filter – A single filter. The filter can be a category, numeric, or datetime filter type. For more information on filters, see Filter. Setting up Before you begin, make sure that you have the following assets and information prepared. • The sheet ID of the sheet that you want to scope the FilterGroup to. This can be obtained with the getSheets method in the Embedding SDK. • The dataset and column identifier of the dataset that you want to filter. This can be obtained through the DescribeDashboardDefinition API operation. Depending on the column type that you use, there might be restrictions on the types of filters that can be added to an embedded asset. For more information on filter restrictions, see Filter. • The visual ID of the visual that you want to scope the FilterGroup to, if applicable. This can be obtained by using the getSheetVisuals method in the Embedding SDK. In addition to the getSheetVisuals method, the FilterGroup that you add can only be scoped to the currently selected sheet. Embedding custom assets 1426 Amazon QuickSight User Guide To use this feature, you must already have a dashboard or visual embedded into your application through the QuickSight Embedding SDK. For more information about using the QuickSight Embedding SDK, see the amazon-quicksight-embedding-sdk on GitHub. SDK method interface Dashboard embedding getter methods The following table describes different dashboard embedding getter methods that developers can use. Method Description getFilterGroupsForSheet(sheetId: |
amazon-quicksight-user-394 | amazon-quicksight-user.pdf | 394 | applicable. This can be obtained by using the getSheetVisuals method in the Embedding SDK. In addition to the getSheetVisuals method, the FilterGroup that you add can only be scoped to the currently selected sheet. Embedding custom assets 1426 Amazon QuickSight User Guide To use this feature, you must already have a dashboard or visual embedded into your application through the QuickSight Embedding SDK. For more information about using the QuickSight Embedding SDK, see the amazon-quicksight-embedding-sdk on GitHub. SDK method interface Dashboard embedding getter methods The following table describes different dashboard embedding getter methods that developers can use. Method Description getFilterGroupsForSheet(sheetId: string) Returns all FilterGroups that are currently scoped to the sheet that is supplied in the parameter. getFilterGroupsForVisual(sh eetId: string, visualId: string) Returns all FilterGroups that are scoped to the visual that is supplied in the parameter. If the sheet that is supplied in the parameter is not the currently selected sheet of the embedded dashboard, the above methods return an error. Visual embedding getter methods The following table describes different visual embedding getter methods that developers can use. Method Description getFilterGroups() Returns all FilterGroups that are currently scoped to the embedded visual. Setter methods The following table describes different setter methods that developers can use for dashboard or visual embedding. Embedding custom assets 1427 Amazon QuickSight Method addFilterGroups(filterGroups: FilterGroup[]) updateFilterGroups(filterGroups: FilterGroup[]) User Guide Description Adds and applies the supplied FilterGroups to the embedded dashboard or visual. A ResponseMessage that indicates whether the addition was successful is returned. Updates the FilterGroups on the embedded experience that contains the same FilterGroupId as the FilterGroup that is supplied in the parameter. A ResponseM essage that indicates whether the update was successful is returned. removeFilterGroups(filterGr Removes the supplied FilterGroups from the oupsOrIds: FilterGroup[] | string[]) dashboard and returns a ResponseMessage that indicates whether the removal attempt is successful. The FilterGroup that is supplied must be scoped to the embedded sheet or visual that is currently selected. Customize the look and feel of QuickSight embedded dashboards and visuals You can use the Amazon QuickSight Embedding SDK (version 2.5.0 and higher) to make changes to the theming of your embedded QuickSight dashboards and visuals at runtime. Runtime theming makes it easier to integrate your Software as a service (SaaS) application with your Amazon QuickSight embedded assets. Runtime theming allows you to synchronize the theme of your embedded content with the themes of the parent application that your QuickSight assets are embedded into. You can also use runtime theming to add customization options for readers. Theming changes can be applied to embedded assets at initialization or throughout the lifetime of your embedded dashboard or visual. For more information about themes, see Using themes in Amazon QuickSight. For more information about using the QuickSight Embedding SDK, see the amazon-quicksight-embedding- sdk on GitHub. Prerequisites Embedding custom assets 1428 Amazon QuickSight User Guide Before you can get started, make sure that you have the following prerequisites. • You are using the QuickSight Embedding SDK version 2.5.0 or higher. • Permissions to access the theme that you want to work with. To grant permissions to a theme in QuickSight, make a UpdateThemePermissions API call or use the Share icon next to the theme in the QuickSight console's analysis editor. Terminology and concepts The following terminology can be useful when working with embedded runtime theming. • Theme – A collection of settings that you can apply to multiple analyses and dashboards that change how the content is displayed. • ThemeConfiguration – A configuration object that contains all of the display properties for a theme. • Theme Override – A ThemeConfiguration object that is applied to the active theme to override some or all aspects of how content is displayed. • Theme ARN – An Amazon Resource Name (ARN) that identifies a QuickSight theme. Following is an example of custom theme ARN. arn:aws:quicksight:region:account-id:theme/theme-id QuickSight provided starter themes don't have a region in their theme ARN. Following is an example of a starter theme ARN. arn:aws:quicksight::aws:theme/CLASSIC Setting up Make sure that you have the following information ready to get started working with runtime theming. • The theme ARNs of the themes that you want to use. You can choose an existing theme, or you can create a new one. To obtain a list all themes and theme ARNs in your QuickSight account, make a call to the ListThemes API operation. For information on preset QuickSight themes, see Setting a default theme for Amazon QuickSight analyses with the QuickSight APIs. • If you are using registered user embedding, make sure that the user has access to the themes that you want to use. Embedding custom assets 1429 Amazon QuickSight User Guide If you are using anonymous user embedding, pass a list of theme ARNs to the AuthorizedResourceArns parameter of the GenerateEmbedUrlForAnonymousUser API. Anonymous users |
amazon-quicksight-user-395 | amazon-quicksight-user.pdf | 395 | you can create a new one. To obtain a list all themes and theme ARNs in your QuickSight account, make a call to the ListThemes API operation. For information on preset QuickSight themes, see Setting a default theme for Amazon QuickSight analyses with the QuickSight APIs. • If you are using registered user embedding, make sure that the user has access to the themes that you want to use. Embedding custom assets 1429 Amazon QuickSight User Guide If you are using anonymous user embedding, pass a list of theme ARNs to the AuthorizedResourceArns parameter of the GenerateEmbedUrlForAnonymousUser API. Anonymous users are granted access to any theme that is listed in the AuthorizedResourceArns parameter. SDK method interface Setter methods The following table describes different setter methods that developers can use for runtime theming. Method setTheme(themeArn: string) setThemeOverride(themeOverride: ThemeConfiguration) Description Replaces the active theme of a dashboard or visual with another theme. If applied, the theme override is removed. An error is returned if you don't have access to the theme or if the theme doesn't exist. Sets a dynamic ThemeConfiguration to override the current active theme. This replaces the previously set theme override. Any values that are not supplied in the new ThemeConfiguration the values in the currently active theme. are defaulted to An error is returned if the ThemeConf iguration that you supply is invalid. Initializing embedded content with a theme To initialize an embedded dashboard or visual with a non-default theme, define a themeOptions object on the DashboardContentOptions or VisualContentOptions parameters, and set the themeArn property within themeOptions to the desired theme ARN. The following example initializes an embedded dashboard with the MIDNIGHT theme. Embedding custom assets 1430 Amazon QuickSight User Guide import { createEmbeddingContext } from 'amazon-quicksight-embedding-sdk'; const embeddingContext = await createEmbeddingContext(); const { embedDashboard, } = embeddingContext; const frameOptions = { url: '<YOUR_EMBED_URL>', container: '#experience-container', }; const contentOptions = { themeOptions: { themeArn: "arn:aws:quicksight::aws:theme/MIDNIGHT" } }; // Embedding a dashboard experience const embeddedDashboardExperience = await embedDashboard(frameOptions, contentOptions); Initializing embedded content with a theme override Developers can use theme overrides to define the theme of an embedded dashboard or visual at runtime. This allows the dashboard or visual to inherit a theme from a third-party application without the need to pre-configure a theme within QuickSight. To initialize an embedded dashboard or visual with a theme override, set the themeOverride property within themeOptions in either the DashboardContentOptions or VisualContentOptions parameters. The following example overrides the font of a dashboard's theme from the default font to Amazon Ember. import { createEmbeddingContext } from 'amazon-quicksight-embedding-sdk'; const embeddingContext = await createEmbeddingContext(); const { embedDashboard, } = embeddingContext; const frameOptions = { url: '<YOUR_EMBED_URL>', container: '#experience-container', }; Embedding custom assets 1431 Amazon QuickSight const contentOptions = { User Guide themeOptions: { "themeOverride":{"Typography":{"FontFamilies":[{"FontFamily":"Comic Neue"}]}} } }; // Embedding a dashboard experience const embeddedDashboardExperience = await embedDashboard(frameOptions, contentOptions); Initializing embedded content with preloaded themes Developers can configure a set of dashboard themes to be preloaded on initialization. This is most beneficial for quick toggling between different views, for example dark and light modes. An embedded dashboard or visual can be initialized with up to 5 preloaded themes. To use preloaded themes, set the preloadThemes property in either DashboardContentOptions or VisualContentOptions with an array of up to 5 themeArns. The following example preloads the Midnight and Rainier starter themes to a dashboard. import { createEmbeddingContext } from 'amazon-quicksight-embedding-sdk'; const embeddingContext = await createEmbeddingContext(); const { embedDashboard, } = embeddingContext; const frameOptions = { url: '<YOUR_EMBED_URL>', container: '#experience-container', }; const contentOptions = { themeOptions: { "preloadThemes": ["arn:aws:quicksight::aws:theme/RAINIER", "arn:aws:quicksight::aws:theme/MIDNIGHT"] } }; // Embedding a dashboard experience const embeddedDashboardExperience = await embedDashboard(frameOptions, contentOptions); Embedding custom assets 1432 Amazon QuickSight User Guide Using the Amazon QuickSight Embedding SDK to enable shareable links to embedded dashboard views QuickSight developers can use the Amazon QuickSight Embedding SDK (version 2.8.0 and higher) to allow readers of embedded dashboards to receive and distribute shareable links to their view of an embedded dashboard. Developers can use dashboard or console embedding to generate a shareable link to their application page with QuickSight's reference encapsulated using the QuickSight Embedding SDK. QuickSight Readers can then send this shareable link to their peers. When their peer accesses the shared link, they are taken to the page on the application that contains the embedded QuickSight dashboard. Developers can also generate and save shareable links of dashboard views that can be used as a bookmarks for anonymous readers of QuickSight when using anonymous embedding. Prerequisites Before you get started, make sure that you are using the QuickSight Embedding SDK version 2.8.0 or higher Topics • Enabling the SharedView feature configuration for QuickSight embedded analytics • Creating a shared view with the QuickSight createSharedView API • Consuming a shared QuickSight view Enabling the SharedView feature configuration for QuickSight embedded analytics When you |
amazon-quicksight-user-396 | amazon-quicksight-user.pdf | 396 | link, they are taken to the page on the application that contains the embedded QuickSight dashboard. Developers can also generate and save shareable links of dashboard views that can be used as a bookmarks for anonymous readers of QuickSight when using anonymous embedding. Prerequisites Before you get started, make sure that you are using the QuickSight Embedding SDK version 2.8.0 or higher Topics • Enabling the SharedView feature configuration for QuickSight embedded analytics • Creating a shared view with the QuickSight createSharedView API • Consuming a shared QuickSight view Enabling the SharedView feature configuration for QuickSight embedded analytics When you create an the embedded instance with the QuickSight API, set the value of SharedView in the FeatureConfigurations payload to true, as shown in the example below. SharedView overrides the StatePersistence configurations for registered users who access embedded dashboards. If a dashboard user has StatePersistence disabled and SharedView enabled, their state will persist. const generateNewEmbedUrl = async () => { const generateUrlPayload = { experienceConfiguration: { QuickSightConsole: { FeatureConfigurations: { "SharedView": { "Enabled": true Embedding custom assets 1433 Amazon QuickSight }, }, }, } const result: GenerateEmbedUrlResult = await generateEmbedUrlForRegisteredUser(generateUrlPayload); return result.url; }; User Guide Creating a shared view with the QuickSight createSharedView API After you update the Embedding SDK to version 2.8.0 or higher, use the createSharedView API to create a new shared view. Record the sharedViewId and the dashboardId that the operation returns. The example below creates a new shared view. const response = await embeddingFrame.createSharedView(); const sharedViewId = response.message.sharedViewId; const dashboardId = response.message.dashboardId; createSharedView can only be called when a user views a dashboard. For console-specific shared view creation, make sure that users are on the dashboard page before you enable the createSharedView action. You can do this with the PAGE_NAVIGATION event, shown in the example below. const contentOptions = { onMessage: async (messageEvent, metadata) => { switch (messageEvent.eventName) { case 'CONTENT_LOADED': { console.log("Do something when the embedded experience is fully loaded."); break; } case 'ERROR_OCCURRED': { console.log("Do something when the embedded experience fails loading."); break; } case 'PAGE_NAVIGATION': { setPageType(messageEvent.message.pageType); if (messageEvent.message.pageType === 'DASHBOARD') { setShareEnabled(true); } else { Embedding custom assets 1434 Amazon QuickSight User Guide setShareEnabled(false); } break; } } } }; Consuming a shared QuickSight view After you create a new shared view, use the Embedding SDK to make the shared view consumable for other users. The examples below set up a consumable shared view for an embedded dashboard in Amazon QuickSight. With an appended URL Append the sharedViewId to the embed URL, under /views/{viewId}, and expose this URL to your users. Users can use this URL to will navigate to that shared view. const response = await dashboardFrame.createSharedView(); const newEmbedUrl = await generateNewEmbedUrl(); const formattedUrl = new URL(newEmbedUrl); formattedUrl.pathname = formattedUrl.pathname.concat('/views/' + response.message.sharedViewId); const baseUrl = formattedUrl.href; alert("Click to view this QuickSight shared view", baseUrl); With the contentOptions SDK Pass a viewId to the contentOptions to open the experience with the given viewId. const contentOptions = { toolbarOptions: { ... }, viewId: sharedViewId, }; const embeddedDashboard = await embeddingContext.embedDashboard( {container: containerRef.current}, contentOptions ); Embedding custom assets 1435 Amazon QuickSight With the InitialPath property User Guide const shareView = async() => { const returnValue = await consoleFrame.createSharedView(); const {dashboardId, sharedViewId} = returnValue.message; const newEmbedUrl = await generateNewEmbedUrl(`/dashboards/${dashboardId}/views/ ${sharedViewId}`); setShareUrl(newEmbedUrl); }; const generateNewEmbedUrl = async (initialPath) => { const generateUrlPayload = { experienceConfiguration: { QuickSightConsole: { InitialPath: initialPath, FeatureConfigurations: { "SharedView": { "Enabled": true }, }, }, } const result: GenerateEmbedUrlResult = await generateEmbedUrlForRegisteredUser(generateUrlPayload); return result.url; }; Embedding QuickSight visuals and dashboards with a 1-click embed code You can embed a visual or dashboard in your application using an embed code. You get this code when you share the dashboard or from the Embed visual menu in Amazon QuickSight. You can embed a visual or dashboard in your internal application for your registered users. Or you can turn on public sharing in the QuickSight console. Doing this grants anyone on the internet access to a shared visual or dashboard that is embedded in a public application, wiki, or portal. Following, you can find descriptions about how to embed visuals and dashboards using the 1-click visual or dashboard embed code. Topics 1-click embedding 1436 Amazon QuickSight User Guide • Embedding QuickSight visuals and dashboards for registered users with a 1-click embed code • Embedding QuickSight visuals and dashboards for anonymous users with a 1-click embed code Embedding QuickSight visuals and dashboards for registered users with a 1-click embed code Applies to: Enterprise Edition You can embed a visual or dashboard in your internal application for registered users of your Amazon QuickSight account. You do so using the embed code that you get when you share the dashboard or from the Embed visual menu in QuickSight. You don't have to run the QuickSight embedding API to generate |
amazon-quicksight-user-397 | amazon-quicksight-user.pdf | 397 | User Guide • Embedding QuickSight visuals and dashboards for registered users with a 1-click embed code • Embedding QuickSight visuals and dashboards for anonymous users with a 1-click embed code Embedding QuickSight visuals and dashboards for registered users with a 1-click embed code Applies to: Enterprise Edition You can embed a visual or dashboard in your internal application for registered users of your Amazon QuickSight account. You do so using the embed code that you get when you share the dashboard or from the Embed visual menu in QuickSight. You don't have to run the QuickSight embedding API to generate the embed code. You can copy the embed code from QuickSight and paste it in your internal application's HTML code. When users and groups (or all users on your QuickSight account) who have access to the dashboard that you want to embed or that holds the visual that you want to embed access your internal application, they're prompted to sign in to the QuickSight account with their credentials. After they are authenticated, they can access the visual or dashboard on their internal page. If you have single sign-on enabled, users aren't prompted to sign in again. Following, you can find descriptions about how to embed a visual or dashboard for registered users using the visual or dashboard embed code. Before you start Before you get started, make sure of the following: • Your internet browser settings contain one of the following to allow communication between the popup and the iframe: • Native support for the Mozilla Broadcast Channel API. For more information, see Broadcast Channel API in the Mozilla documentation. • IndexedDB support. • LocalStorage support. • Your internet browser's "block all cookies" settings is turned off. 1-click embedding 1437 Amazon QuickSight User Guide Step 1: Grant access to the dashboard For users to access your embedded dashboard, grant them access to view it. You can grant individual users and groups access to a dashboard, or you can grant everyone in your account access. Visual permissions are determined at the dashboard level. To grant access to embedded visuals, grant access to the dashboard that the visual belongs to. For more information, see Granting access to a dashboard. Step 2: Put the domain where you want to embed the visual or dashboard on your allow list To embed visuals and dashboards in your internal application, make sure that the domain where you're embedding is allow-listed in your QuickSight account. For more information, see Allow listing static domains. Step 3: Get the embed code Use the following procedure to get the visual or dashboard embed code. To get the dashboard embed code 1. Open the published dashboard in QuickSight and choose Share at upper right. Then choose Share dashboard. 2. In the Share dashboard page that opens, choose Copy embed code at upper left. 1-click embedding 1438 Amazon QuickSight User Guide The embed code is copied to your clipboard and is similar to the following. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <iframe width="960" height="720" src="https://quicksightdomain/sn/embed/share/accounts/accountid/ dashboards/dashboardid?directory_alias=account_directory_alias"> </iframe> To get the visual embed code 1. Open the published dashboard in QuickSight and choose the visual that you want to embed. Then open the on-visual menu at the upper right of the visual and choose Embed visual. 2. In the Embed visual pane that opens, choose Copy code. 1-click embedding 1439 Amazon QuickSight User Guide The embed code is copied to your clipboard and is similar to the following. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <iframe 1-click embedding 1440 Amazon QuickSight width="600" User Guide height="400" src="https://quicksightdomain/sn/embed/share/accounts/111122223333/ dashboards/DASHBOARDID/sheets/SHEETID>/visuals/VISUALID"> </iframe> Step 4: Paste the code into your internal application's HTML page Use the following procedure to paste the embed code into your internal application's HTML page To paste the code in your internal application's HTML page • Open the HTML code for any page where you want to embed the dashboard and paste the embed code in. The following example shows what this might look like for an embedded dashboard. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <!DOCTYPE html> <html> <body> <h2>Example.com - Employee Portal</h2> <h3>Current shipment stats</h3> <iframe width="960" height="720" src="https://quicksightdomain/sn/embed/share/accounts/accountid/ dashboards/dashboardid?directory_alias=account_directory_alias"> </iframe> </body> </html> The following example shows what this might look like for an embedded visual. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <!DOCTYPE html> <html> 1-click embedding 1441 Amazon QuickSight <body> User Guide <h2>Example.com - Employee Portal</h2> <h3>Current shipment stats</h3> <iframe width="600" height="400" src="https://quicksightdomain/sn/embed/share/accounts/111122223333/ dashboards/DASHBOARDID/sheets/SHEETID>/visuals/VISUALID? directory_alias=account_directory_alias"> </iframe> </body> </html> For example, let's say that you want to embed your visual or dashboard in an internal Google Sites page. You can open the page on |
amazon-quicksight-user-398 | amazon-quicksight-user.pdf | 398 | <!DOCTYPE html> <html> <body> <h2>Example.com - Employee Portal</h2> <h3>Current shipment stats</h3> <iframe width="960" height="720" src="https://quicksightdomain/sn/embed/share/accounts/accountid/ dashboards/dashboardid?directory_alias=account_directory_alias"> </iframe> </body> </html> The following example shows what this might look like for an embedded visual. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <!DOCTYPE html> <html> 1-click embedding 1441 Amazon QuickSight <body> User Guide <h2>Example.com - Employee Portal</h2> <h3>Current shipment stats</h3> <iframe width="600" height="400" src="https://quicksightdomain/sn/embed/share/accounts/111122223333/ dashboards/DASHBOARDID/sheets/SHEETID>/visuals/VISUALID? directory_alias=account_directory_alias"> </iframe> </body> </html> For example, let's say that you want to embed your visual or dashboard in an internal Google Sites page. You can open the page on Google Sites and paste the embed code in an embed widget. If you want to embed your visual or dashboard in an internal Microsoft SharePoint site, you can create a new page and then paste the embed code in an Embed web part. Embedding QuickSight visuals and dashboards for anonymous users with a 1- click embed code Applies to: Enterprise Edition You can embed a visual or dashboard in public sites using the embed code that you get when you share the visual or dashboard in Amazon QuickSight. You can also turn on public sharing by using the QuickSight console and automatically grant access to a shared visual or dashboard to anyone on the internet. Following, you can find how to turn on public sharing for a visual or dashboard and embed the visual or dashboard for anyone on the internet to see. In both cases, you do this by using the 1- click embed code. Before you start Before you get started, make sure of the following: 1-click embedding 1442 Amazon QuickSight User Guide • Your internet browser settings contain one of the following to allow communication between the popup and the iframe that sharing uses: • Native support for the Mozilla Broadcast Channel API. For more information, see Broadcast Channel API in the Mozilla documentation. • IndexedDB support. • LocalStorage support. • Your internet browser's "block all cookies" settings is turned off. Step 1: Turn on public access for the dashboard For anyone on the internet to access your embedded visual or dashboard, first turn on public access for the dashboard. Visual permissions are determined at the dashboard level. To grant access to embedded visuals, grant access to the dashboard that the visual belongs to. For more information, see Granting anyone on the internet access to an Amazon QuickSight dashboard. Step 2: Put the domain where you want to embed the visual or dashboard on your allow list To embed visuals and dashboards in a public application, wiki, or portal, make sure that the domain where you're embedding it is on the allow list for your QuickSight account. Step 3: Get the embed code Use the following procedure to get the visual or dashboard embed code. To get the dashboard embed code 1. Open the published dashboard in QuickSight and choose Share at upper right. Then choose Share dashboard. 1-click embedding 1443 Amazon QuickSight User Guide 2. In the Share dashboard page that opens, choose Copy embed code at upper left. The embed code is copied to your clipboard and is similar to the following. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <iframe width="960" height="720" src="https://quicksightdomain/sn/ embed/share/accounts/accountid/dashboards/dashboardid"> </iframe> 1-click embedding 1444 Amazon QuickSight To get the visual embed code User Guide 1. Open the published dashboard in QuickSight and choose the visual that you want to embed. Then open the on-visual menu in the top right corner of the visual and choose Embed visual. 2. In the Embed visual pane that opens, choose Copy code. 1-click embedding 1445 Amazon QuickSight User Guide The embed code is copied to your clipboard and is similar to the following. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <iframe 1-click embedding 1446 Amazon QuickSight width="600" User Guide height="400" src="https://quicksightdomain/sn/embed/share/accounts/111122223333/ dashboards/DASHBOARDID/sheets/SHEETID>/visuals/VISUALID"> </iframe> Step 4: Paste the embed code into an HTML page, wiki page, or portal Use the following procedure to paste the embed code into an HTML page, wiki page, or portal. To paste the embed code • Open the HTML code for the location where you want to embed the visual or dashboard, and paste the embed code in. The following example shows what this might look like for an embedded dashboard. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <!DOCTYPE html> <html> <body> <h2>Example.com - Employee Portal</h2> <h3>Current shipment stats</h3> <iframe width="960" height="720" src="https://quicksightdomain/sn/ embed/share/accounts/accountid/dashboards/dashboardid"> </iframe> </body> </html> The following example shows what this might look like for an embedded visual. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <!DOCTYPE html> <html> 1-click embedding 1447 Amazon QuickSight |
amazon-quicksight-user-399 | amazon-quicksight-user.pdf | 399 | where you want to embed the visual or dashboard, and paste the embed code in. The following example shows what this might look like for an embedded dashboard. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <!DOCTYPE html> <html> <body> <h2>Example.com - Employee Portal</h2> <h3>Current shipment stats</h3> <iframe width="960" height="720" src="https://quicksightdomain/sn/ embed/share/accounts/accountid/dashboards/dashboardid"> </iframe> </body> </html> The following example shows what this might look like for an embedded visual. The quicksightdomain in this example is the URL that you use to access your QuickSight account. <!DOCTYPE html> <html> 1-click embedding 1447 Amazon QuickSight <body> User Guide <h2>Example.com - Employee Portal</h2> <h3>Current shipment stats</h3> <iframe width="600" height="400" src="https://quicksightdomain/sn/embed/share/accounts/111122223333/ dashboards/DASHBOARDID/sheets/SHEETID>/visuals/VISUALID"> </iframe> </body> </html> If your public-facing applications are built on Google Sites, open the page on Google Sites and then paste the embed code using the embed widget. Make sure that the following domains in QuickSight are on your allow list when you embed in Google Sites: • https://googleusercontent.com (turns on subdomains) • https://www.gstatic.com • https://sites.google.com After you embed the visual or dashboard in your application, anyone who can access your application can access the embedded visual or dashboard. To update a dashboard that's shared with the public, see Updating a publicly shared dashboard. To turn off public sharing, see Turning off public sharing settings. When you turn off public sharing, no one from the internet can access a dashboard or dashboards that you have embedded on a public application or shared with a link. The next time anyone tries to view such a dashboard from the internet, they receive a message that they don't have access to view it. Embedding with the Amazon QuickSight APIs Applies to: Enterprise Edition Embedding with the QuickSight APIs 1448 Amazon QuickSight User Guide Intended audience: Amazon QuickSight developers There are only a few steps involved in the actual process of embedding analytics using the QuickSight APIs. Before you begin, make sure to have the following items in place: • Set up the required IAM permissions for the caller identity used by your application that will use the AWS SDK to make API calls. For example, grant permission to allow the quicksight:GenerateEmbedUrlForAnonymousUser or quicksight:GenerateEmbedUrlForRegisteredUser action. • To embed for registered users, share QuickSight assets with them beforehand. For new authenticating users, know how to grant access to the assets. One way to do this is by adding all the assets to a QuickSight folder. If you prefer to use the QuickSight API, use the DescribeDashboardPermissions and UpdateDashboardPermissions API operations. For more information, see DescribeDashboardPermissions or UpdateDashboardPermissions in the Amazon QuickSight API Reference. If you want to share the dashboard with all users in a namespace or group, you can share the dashboard with namespace or group. • If you're embedding dashboards, make sure to have the ID of the dashboards you want to embed. The dashboard ID is the code in the URL of the dashboard. You can also get it from the dashboard URL. • A QuickSight administrator must explicitly enable domains where you plan to embed your QuickSight analytics. You can do this by using the Manage QuickSight, Domains and Embedding from the profile menu, or you can use the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser or GenerateEmbedUrlForRegisteredUser API call. This option is only visible to QuickSight administrators. You can also add subdomains as part of a domain. For more information, see Allow listing domains at runtime with the QuickSight API. All domains in your static allow list (such as development, staging, and production) must be explicitly allowed, and they must use HTTPS. You can add up to 100 domains to the allow list. You can add domains at runtime with QuickSight API operations. After all the prerequisites are complete, embedding QuickSight involves the following steps, which are explained in greater detail later: Embedding with the QuickSight APIs 1449 Amazon QuickSight User Guide 1. For authentication, use your application server to authenticate the user. After authentication in your server, generate the embedded dashboard URL using the AWS SDK that you need. 2. In your web portal or application, embed QuickSight using the generated URL. To simplify this process, you can use the Amazon QuickSight Embedding SDK, available on NPMJS and GitHub. This customized JavaScript SDK is designed to help you efficiently integrate QuickSight into your application pages, set defaults, connect controls, get callbacks, and handle errors. You can use AWS CloudTrail auditing logs to get information about the number of embedded dashboards, users of an embedded experience, and access rates. Topics • Embedding Amazon QuickSight dashboards with the QuickSight API • Embedding Amazon QuickSight visuals with the QuickSight APIs • Embedding the full functionality of the Amazon QuickSight console for registered users • Embedding the Amazon Q in QuickSight Generative Q&A experience • Embedding the Amazon QuickSight Q |
amazon-quicksight-user-400 | amazon-quicksight-user.pdf | 400 | NPMJS and GitHub. This customized JavaScript SDK is designed to help you efficiently integrate QuickSight into your application pages, set defaults, connect controls, get callbacks, and handle errors. You can use AWS CloudTrail auditing logs to get information about the number of embedded dashboards, users of an embedded experience, and access rates. Topics • Embedding Amazon QuickSight dashboards with the QuickSight API • Embedding Amazon QuickSight visuals with the QuickSight APIs • Embedding the full functionality of the Amazon QuickSight console for registered users • Embedding the Amazon Q in QuickSight Generative Q&A experience • Embedding the Amazon QuickSight Q search bar (Classic) • Embedding analytics using the GetDashboardEmbedURL and GetSessionEmbedURL API operations Embedding Amazon QuickSight dashboards with the QuickSight API Use the following topics to learn about embedding dashboards with the Amazon QuickSight API. Topics • Embedding QuickSight dashboards for registered users • Embedding QuickSight dashboards for anonymous (unregistered) users • Enabling executive summaries in embedded dashboards Embedding QuickSight dashboards for registered users Important Amazon QuickSight has new API operations for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. Embedding with the QuickSight APIs 1450 Amazon QuickSight User Guide You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl API operations to embed dashboards and the QuickSight console, but they don't contain the latest embedding capabilities. For more information about embedding using the old API operations, see Embedding analytics using the GetDashboardEmbedURL and GetSessionEmbedURL API operations. Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following sections, you can find detailed information about how to set up embedded Amazon QuickSight dashboards for registered users of Amazon QuickSight. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the dashboard URL Step 1: Set up permissions In the following section, you can find out how to set up permissions for the backend application or web server. This task requires administrative access to IAM. Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access and permissions to the dashboard. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. The IAM role needs to provide permissions to retrieve embedding URLs for a specific user pool. With the help of the wildcard character *, you can grant the permissions to generate a URL for all users in a specific namespace, or for a subset of users in specific namespaces. For this, you add quicksight:GenerateEmbedUrlForRegisteredUser. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForRegisteredUser API operation. The AllowedDomains parameter is an optional parameter. It grants you as a developer the option Embedding with the QuickSight APIs 1451 Amazon QuickSight User Guide to override the static domains that are configured in the Manage QuickSight menu. Instead, you can list up to three domains or subdomains that can access the generated URL. This URL is then embedded in the website that you create. Only the domains that are listed in the parameter can access the embedded visual. Without this condition, you can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the AllowedDomains parameter, see GenerateEmbedUrlForRegisteredUser in the Amazon QuickSight API Reference. The following sample policy provides these permissions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": "arn:partition:quicksight:region:accountId:user/namespace/userName", "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Additionally, if you are creating first-time users who will be Amazon QuickSight readers, make sure to add the quicksight:RegisterUser permission in the policy. The following sample policy provides permission to retrieve an embedding URL for first-time users who are to be QuickSight readers. { Embedding with the QuickSight APIs 1452 Amazon QuickSight User Guide "Version": "2012-10-17", "Statement": [ { "Action": "quicksight:RegisterUser", "Resource": "*", "Effect": "Allow" }, { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": [ "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/ {{namespace}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-1}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-2}}" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Finally, your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", Embedding with the QuickSight APIs 1453 Amazon QuickSight User Guide "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { |
amazon-quicksight-user-401 | amazon-quicksight-user.pdf | 401 | [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Finally, your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", Embedding with the QuickSight APIs 1453 Amazon QuickSight User Guide "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } For more information regarding trust policies for OpenID Connect or SAML authentication, see the following sections of the IAM User Guide: • Creating a Role for Web Identity or OpenID Connect Federation (Console) • Creating a Role for SAML 2.0 Federation (Console) Step 2: Generate the URL with the authentication code attached In the following section, you can find out how to authenticate your user and get the embeddable dashboard URL on your application server. If you plan to embed dashboards for IAM or QuickSight identity types, share the dashboard with the users. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing these steps ensures that each viewer of the dashboard is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. The following examples perform the IAM authentication on the user's behalf. This code runs on your app server. Embedding with the QuickSight APIs 1454 Amazon QuickSight Java User Guide import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult; import com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration; import com.amazonaws.services.quicksight.model.RegisteredUserDashboardEmbeddingConfiguration; /** * Class to call QuickSight AWS SDK to get url for dashboard embedding. */ public class GetQuicksightEmbedUrlRegisteredUserDashboardEmbedding { private final AmazonQuickSight quickSightClient; public GetQuicksightEmbedUrlRegisteredUserDashboardEmbedding() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret-key"); } @Override public void refresh() {} } ) .build(); } public String getQuicksightEmbedUrl( final String accountId, // AWS Account ID Embedding with the QuickSight APIs 1455 Amazon QuickSight User Guide final String dashboardId, // Dashboard ID to embed final List<String> allowedDomains, // Runtime allowed domain for embedding final String userArn // Registered user arn to use for embedding. Refer to Get Embed Url section in developer portal to find out how to get user arn for a QuickSight user. ) throws Exception { final RegisteredUserEmbeddingExperienceConfiguration experienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration() .withDashboard(new RegisteredUserDashboardEmbeddingConfiguration().withInitialDashboardId(dashboardId)); final GenerateEmbedUrlForRegisteredUserRequest generateEmbedUrlForRegisteredUserRequest = new GenerateEmbedUrlForRegisteredUserRequest(); generateEmbedUrlForRegisteredUserRequest.setAwsAccountId(accountId); generateEmbedUrlForRegisteredUserRequest.setUserArn(userArn); generateEmbedUrlForRegisteredUserRequest.setAllowedDomains(allowedDomains); generateEmbedUrlForRegisteredUserRequest.setExperienceConfiguration(experienceConfiguration); final GenerateEmbedUrlForRegisteredUserResult generateEmbedUrlForRegisteredUserResult = quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest); return generateEmbedUrlForRegisteredUserResult.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function generateEmbedUrlForRegisteredUser( accountId, dashboardId, openIdToken, // Cognito-based token userArn, // registered user arn roleArn, // IAM user role to use for embedding sessionName, // Session name for the roleArn assume role allowedDomains, // Runtime allowed domain for embedding getEmbedUrlCallback, // GetEmbedUrl success callback method errorCallback // GetEmbedUrl error callback method Embedding with the QuickSight APIs 1456 Amazon QuickSight ) { const stsClient = new AWS.STS(); let stsParams = { RoleSessionName: sessionName, WebIdentityToken: openIdToken, RoleArn: roleArn } User Guide stsClient.assumeRoleWithWebIdentity(stsParams, function(err, data) { if (err) { console.log('Error assuming role'); console.log(err, err.stack); errorCallback(err); } else { const getDashboardParams = { "AwsAccountId": accountId, "ExperienceConfiguration": { "Dashboard": { "InitialDashboardId": dashboardId } }, "UserArn": userArn, "AllowedDomains": allowedDomains, "SessionLifetimeInMinutes": 600 }; const quicksightClient = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: data.Credentials.AccessKeyId, secretAccessKey: data.Credentials.SecretAccessKey, sessionToken: data.Credentials.SessionToken, expiration: data.Credentials.Expiration } }); quicksightClient.generateEmbedUrlForRegisteredUser(getDashboardParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, Embedding with the QuickSight APIs 1457 Amazon QuickSight User Guide "headers": { "Access-Control-Allow-Origin": "*", // Use your website domain to secure access to GetEmbedUrl API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } getEmbedUrlCallback(result); } }); } }); } Python3 import json import boto3 from botocore.exceptions import ClientError sts = boto3.client('sts') # Function to generate embedded URL # accountId: AWS account ID # dashboardId: Dashboard ID to embed # userArn: arn of registered user # allowedDomains: Runtime allowed domain for embedding # roleArn: IAM user role to use for embedding # sessionName: session name for the roleArn assume role def getEmbeddingURL(accountId, dashboardId, userArn, allowedDomains, roleArn, sessionName): try: assumedRole = sts.assume_role( RoleArn = roleArn, RoleSessionName = sessionName, ) except ClientError as e: return "Error assuming role: " + str(e) else: assumedRoleSession = boto3.Session( aws_access_key_id = assumedRole['Credentials']['AccessKeyId'], aws_secret_access_key = assumedRole['Credentials']['SecretAccessKey'], Embedding with the QuickSight APIs 1458 Amazon QuickSight User Guide aws_session_token = assumedRole['Credentials']['SessionToken'], ) try: quicksightClient = assumedRoleSession.client('quicksight', |
amazon-quicksight-user-402 | amazon-quicksight-user.pdf | 402 | URL # accountId: AWS account ID # dashboardId: Dashboard ID to embed # userArn: arn of registered user # allowedDomains: Runtime allowed domain for embedding # roleArn: IAM user role to use for embedding # sessionName: session name for the roleArn assume role def getEmbeddingURL(accountId, dashboardId, userArn, allowedDomains, roleArn, sessionName): try: assumedRole = sts.assume_role( RoleArn = roleArn, RoleSessionName = sessionName, ) except ClientError as e: return "Error assuming role: " + str(e) else: assumedRoleSession = boto3.Session( aws_access_key_id = assumedRole['Credentials']['AccessKeyId'], aws_secret_access_key = assumedRole['Credentials']['SecretAccessKey'], Embedding with the QuickSight APIs 1458 Amazon QuickSight User Guide aws_session_token = assumedRole['Credentials']['SessionToken'], ) try: quicksightClient = assumedRoleSession.client('quicksight', region_name='us- west-2') response = quicksightClient.generate_embed_url_for_registered_user( AwsAccountId=accountId, ExperienceConfiguration = { "Dashboard": { "InitialDashboardId": dashboardId } }, UserArn = userArn, AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: return "Error generating embedding url: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); Embedding with the QuickSight APIs 1459 Amazon QuickSight User Guide quicksightClient.generateEmbedUrlForRegisteredUser({ 'AwsAccountId': '111122223333', 'ExperienceConfiguration': { 'Dashboard': { 'InitialDashboardId': '1c1fe111-e2d2-3b30-44ef-a0e111111cde' } }, 'UserArn': 'REGISTERED_USER_ARN', 'AllowedDomains': allowedDomains, 'SessionLifetimeInMinutes': 100 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { Status: 200, EmbedUrl: 'https://quicksightdomain/embed/12345/dashboards/67890...' RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' } .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; namespace GenerateDashboardEmbedUrlForRegisteredUser { class Program Embedding with the QuickSight APIs 1460 Amazon QuickSight { User Guide static void Main(string[] args) { var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, SessionToken, Amazon.RegionEndpoint.USEast1); try { RegisteredUserDashboardEmbeddingConfiguration registeredUserDashboardEmbeddingConfiguration = new RegisteredUserDashboardEmbeddingConfiguration { InitialDashboardId = "dashboardId" }; RegisteredUserEmbeddingExperienceConfiguration registeredUserEmbeddingExperienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration { Dashboard = registeredUserDashboardEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new GenerateEmbedUrlForRegisteredUserRequest { AwsAccountId = "111122223333", ExperienceConfiguration = registeredUserEmbeddingExperienceConfiguration, UserArn = "REGISTERED_USER_ARN", AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 100 }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } Embedding with the QuickSight APIs 1461 Amazon QuickSight AWS CLI User Guide To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you're using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you're using SAML to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are taking a just-in-time approach to add users when they first open a dashboard, the role also needs permissions enabled for quicksight:RegisterUser. aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --role-session-name [email protected] The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you're using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" Embedding with the QuickSight APIs 1462 Amazon QuickSight User Guide export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_dashboard_role/[email protected]. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. The role session ID also becomes the user name in QuickSight. You can use this pattern to provision your users in QuickSight ahead of time, or to provision them the first time they access the dashboard. The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API Reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM \ --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --user-role |
amazon-quicksight-user-403 | amazon-quicksight-user.pdf | 403 | Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. The role session ID also becomes the user name in QuickSight. You can use this pattern to provision your users in QuickSight ahead of time, or to provision them the first time they access the dashboard. The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API Reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM \ --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --user-role READER \ --user-name jhnd \ --session-name "[email protected]" \ --email [email protected] \ --region us-east-1 \ --custom-permissions-name TeamA1 If your user is authenticated through Microsoft AD, you don't need to use RegisterUser to set them up. Instead, they should be automatically subscribed the first time they access QuickSight. For Microsoft AD users, you can use DescribeUser to get the user ARN. The first time a user accesses QuickSight, you can also add this user to the group that the dashboard is shared with. The following example shows the CLI command to add a user to a group. aws quicksight create-group-membership \ --aws-account-id=111122223333 \ --namespace=default \ Embedding with the QuickSight APIs 1463 Amazon QuickSight User Guide --group-name=financeusers \ --member-name="embedding_quicksight_dashboard_role/[email protected]" You now have a user of your app who is also a user of QuickSight, and who has access to the dashboard. Finally, to get a signed URL for the dashboard, call generate-embed-url-for-registered- user from the app server. This returns the embeddable dashboard URL. The following example shows how to generate the URL for an embedded dashboard using a server-side call for users authenticated through AWS Managed Microsoft AD or single sign-on (IAM Identity Center). aws quicksight generate-embed-url-for-registered-user \ --aws-account-id 111122223333 \ --session-lifetime-in-minutes 600 \ --user-arn arn:aws:quicksight:us-east-1:111122223333:user/default/ embedding_quicksight_visual_role/embeddingsession \ --allowed-domains '["domain1","domain2"]' \ --experience-configuration Dashboard={InitialDashboardId=1a1ac2b2-3fc3-4b44-5e5d-c6db6778df89} For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can use this and other API operations in your own code. Step 3: Embed the dashboard URL In the following section, you can find out how you can use the Amazon QuickSight Embedding SDK (JavaScript) to embed the dashboard URL from step 3 in your website or application page. With the SDK, you can do the following: • Place the dashboard on an HTML page. • Pass parameters into the dashboard. • Handle error states with messages that are customized to your application. Call the GenerateEmbedUrlForRegisteredUser API operation to generate the URL that you can embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours. The API operation provides the URL with an auth_code that enables a single-sign on session. The following shows an example response from generate-embed-url-for-registered-user. Embedding with the QuickSight APIs 1464 Amazon QuickSight User Guide //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890..", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed this dashboard in your webpage by using the QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the Amazon QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of page load completion and errors. The domain that is going to host embedded dashboards must be on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded dashboards. For more information about adding domains for embedded dashboards, see Allow listing domains at runtime with the QuickSight API. The following example shows how to use the generated URL. This code is generated on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Dashboard Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedDashboard = async() => { const { createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ Embedding with the QuickSight APIs 1465 Amazon QuickSight User Guide onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: '<YOUR_EMBED_URL>', container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { parameters: [ { Name: 'country', Values: [ 'United States' ], }, { Name: 'states', Values: [ 'California', 'Washington' ] } ], locale: "en-US", Embedding with the |
amazon-quicksight-user-404 | amazon-quicksight-user.pdf | 404 | the QuickSight APIs 1465 Amazon QuickSight User Guide onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: '<YOUR_EMBED_URL>', container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { parameters: [ { Name: 'country', Values: [ 'United States' ], }, { Name: 'states', Values: [ 'California', 'Washington' ] } ], locale: "en-US", Embedding with the QuickSight APIs 1466 Amazon QuickSight User Guide sheetOptions: { initialSheetId: '<YOUR_SHEETID>', singleSheet: false, emitSizeChangedEventOnSheetChange: false, }, toolbarOptions: { export: false, undoRedo: false, reset: false }, attributionOptions: { overlayContent: false, }, onMessage: async (messageEvent, experienceMetadata) => { switch (messageEvent.eventName) { case 'CONTENT_LOADED': { console.log("All visuals are loaded. The title of the document:", messageEvent.message.title); break; } case 'ERROR_OCCURRED': { console.log("Error occurred while rendering the experience. Error code:", messageEvent.message.errorCode); break; } case 'PARAMETERS_CHANGED': { console.log("Parameters changed. Changed parameters:", messageEvent.message.changedParameters); break; } case 'SELECTED_SHEET_CHANGED': { console.log("Selected sheet changed. Selected sheet:", messageEvent.message.selectedSheet); break; } case 'SIZE_CHANGED': { console.log("Size changed. New dimensions:", messageEvent.message); break; } case 'MODAL_OPENED': { window.scrollTo({ top: 0 // iframe top position }); Embedding with the QuickSight APIs 1467 Amazon QuickSight User Guide break; } } }, }; const embeddedDashboardExperience = await embeddingContext.embedDashboard(frameOptions, contentOptions); const selectCountryElement = document.getElementById('country'); selectCountryElement.addEventListener('change', (event) => { embeddedDashboardExperience.setParameters([ { Name: 'country', Values: event.target.value } ]); }); }; </script> </head> <body onload="embedDashboard()"> <span> <label for="country">Country</label> <select id="country" name="country"> <option value="United States">United States</option> <option value="Mexico">Mexico</option> <option value="Canada">Canada</option> </select> </span> <div id="experience-container"></div> </body> </html> SDK 1.0 <!DOCTYPE html> <html> <head> <title>Basic Embed</title> Embedding with the QuickSight APIs 1468 Amazon QuickSight User Guide <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var dashboard function onDashboardLoad(payload) { console.log("Do something when the dashboard is fully loaded."); } function onError(payload) { console.log("Do something when the dashboard fails loading"); } function embedDashboard() { var containerDiv = document.getElementById("embeddingContainer"); var options = { // replace this dummy url with the one generated via embedding API url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", container: containerDiv, parameters: { country: "United States" }, scrolling: "no", height: "700px", width: "1000px", locale: "en-US", footerPaddingEnabled: true }; dashboard = QuickSightEmbedding.embedDashboard(options); dashboard.on("error", onError); dashboard.on("load", onDashboardLoad); } function onCountryChange(obj) { dashboard.setParameters({country: obj.value}); } </script> </head> <body onload="embedDashboard()"> <span> <label for="country">Country</label> <select id="country" name="country" onchange="onCountryChange(this)"> <option value="United States">United States</option> Embedding with the QuickSight APIs 1469 Amazon QuickSight User Guide <option value="Mexico">Mexico</option> <option value="Canada">Canada</option> </select> </span> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded dashboard on your website using JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Embedding QuickSight dashboards for anonymous (unregistered) users Important Amazon QuickSight has new API operations for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl API operations to embed dashboards and the QuickSight console, but they don't contain the latest embedding capabilities. For more information about embedding using the old API operations, see Embedding analytics using the GetDashboardEmbedURL and GetSessionEmbedURL API operations. Applies to: Enterprise Edition Embedding with the QuickSight APIs 1470 Amazon QuickSight User Guide Intended audience: Amazon QuickSight developers In the following sections, you can find detailed information about how to set up embedded Amazon QuickSight dashboards for anonymous (unregistered) users. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the dashboard URL Step 1: Set up permissions Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following section, you can find out how to set up permissions for the backend application or web server. This task requires administrative access to IAM. Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access and permissions to the dashboard. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The AllowedDomains parameter is an optional parameter. It grants you as a developer the option to override the static domains that are configured in the Manage QuickSight menu. Instead, you can list up to three domains or subdomains that can access a generated URL. This URL is then embedded in the website that you create. Only the |
amazon-quicksight-user-405 | amazon-quicksight-user.pdf | 405 | account. Associate an IAM policy with the role to provide permissions to any user who assumes it. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The AllowedDomains parameter is an optional parameter. It grants you as a developer the option to override the static domains that are configured in the Manage QuickSight menu. Instead, you can list up to three domains or subdomains that can access a generated URL. This URL is then embedded in the website that you create. Only the domains that are listed in the parameter can access the embedded dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the Embedding with the QuickSight APIs 1471 Amazon QuickSight User Guide AllowedDomains parameter, see GenerateEmbedUrlForAnonymousUser in the Amazon QuickSight API Reference. The following sample policy provides these permissions for use with GenerateEmbedUrlForAnonymousUser. For this approach to work, you also need a session pack, or session capacity pricing, for your AWS account. Otherwise, when a user tries to access the dashboard, the error UnsupportedPricingPlanException is returned. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForAnonymousUser" ], "Resource": [ "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/ {{namespace}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-1}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-2}}" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } Your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf to open the dashboard. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ Embedding with the QuickSight APIs 1472 User Guide Amazon QuickSight { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } For more information regarding trust policies, see Temporary security credentials in IAM in the IAM User Guide. Step 2: Generate the URL with the authentication code attached Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following section, you can find how to authenticate on behalf of the anonymous visitor and get the embeddable dashboard URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. The following examples perform the IAM authentication on the user's behalf. It passes an identifier as the unique role session ID. This code runs on your app server. Embedding with the QuickSight APIs 1473 Amazon QuickSight Java User Guide import java.util.List; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.RegisteredUserDashboardEmbeddingConfiguration; import com.amazonaws.services.quicksight.model.AnonymousUserEmbeddingExperienceConfiguration; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserResult; import com.amazonaws.services.quicksight.model.SessionTag; /** * Class to call QuickSight AWS SDK to generate embed url for anonymous user. */ public class GenerateEmbedUrlForAnonymousUserExample { private final AmazonQuickSight quickSightClient; public GenerateEmbedUrlForAnonymousUserExample() { quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret-key"); } @Override public void refresh() { } } ) .build(); Embedding with the QuickSight APIs 1474 Amazon QuickSight } User Guide public String GenerateEmbedUrlForAnonymousUser( final String accountId, // YOUR AWS ACCOUNT ID final String initialDashboardId, // DASHBOARD ID TO WHICH THE CONSTRUCTED URL POINTS. final String namespace, // ANONYMOUS EMBEDDING REQUIRES SPECIFYING A VALID NAMESPACE FOR WHICH YOU WANT THE EMBEDDING URL final List<String> authorizedResourceArns, // DASHBOARD ARN LIST TO EMBED final List<String> allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING final List<SessionTag> sessionTags // SESSION TAGS USED FOR ROW-LEVEL SECURITY ) throws Exception { AnonymousUserEmbeddingExperienceConfiguration experienceConfiguration = new AnonymousUserEmbeddingExperienceConfiguration(); AnonymousUserDashboardEmbeddingConfiguration dashboardConfiguration = new AnonymousUserDashboardEmbeddingConfiguration(); dashboardConfiguration.setInitialDashboardId(initialDashboardId); experienceConfiguration.setDashboard(dashboardConfiguration); GenerateEmbedUrlForAnonymousUserRequest generateEmbedUrlForAnonymousUserRequest = new GenerateEmbedUrlForAnonymousUserRequest() .withAwsAccountId(accountId) .withNamespace(namespace) .withAuthorizedResourceArns(authorizedResourceArns) .withExperienceConfiguration(experienceConfiguration) .withSessionTags(sessionTags) .withSessionLifetimeInMinutes(600L); // OPTIONAL: VALUE CAN BE [15-600]. DEFAULT: 600 .withAllowedDomains(allowedDomains); GenerateEmbedUrlForAnonymousUserResult dashboardEmbedUrl = quickSightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserRequest); return dashboardEmbedUrl.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); Embedding with the QuickSight APIs 1475 Amazon QuickSight User Guide const AWS = require('aws-sdk'); function generateEmbedUrlForAnonymousUser( accountId, // YOUR AWS ACCOUNT ID initialDashboardId, // DASHBOARD ID TO WHICH THE CONSTRUCTED URL POINTS quicksightNamespace, // VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING authorizedResourceArns, // DASHBOARD ARN LIST TO EMBED allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING sessionTags, // SESSION TAGS USED FOR ROW-LEVEL SECURITY generateEmbedUrlForAnonymousUserCallback, // GENERATEEMBEDURLFORANONYMOUSUSER SUCCESS CALLBACK METHOD errorCallback // GENERATEEMBEDURLFORANONYMOUSUSER ERROR CALLBACK METHOD ) { const experienceConfiguration = { "DashboardVisual": { "InitialDashboardVisualId": { "DashboardId": "dashboard_id", "SheetId": "sheet_id", "VisualId": "visual_id" } } }; const generateEmbedUrlForAnonymousUserParams = |
amazon-quicksight-user-406 | amazon-quicksight-user.pdf | 406 | require('node-fetch'); Embedding with the QuickSight APIs 1475 Amazon QuickSight User Guide const AWS = require('aws-sdk'); function generateEmbedUrlForAnonymousUser( accountId, // YOUR AWS ACCOUNT ID initialDashboardId, // DASHBOARD ID TO WHICH THE CONSTRUCTED URL POINTS quicksightNamespace, // VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING authorizedResourceArns, // DASHBOARD ARN LIST TO EMBED allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING sessionTags, // SESSION TAGS USED FOR ROW-LEVEL SECURITY generateEmbedUrlForAnonymousUserCallback, // GENERATEEMBEDURLFORANONYMOUSUSER SUCCESS CALLBACK METHOD errorCallback // GENERATEEMBEDURLFORANONYMOUSUSER ERROR CALLBACK METHOD ) { const experienceConfiguration = { "DashboardVisual": { "InitialDashboardVisualId": { "DashboardId": "dashboard_id", "SheetId": "sheet_id", "VisualId": "visual_id" } } }; const generateEmbedUrlForAnonymousUserParams = { "AwsAccountId": accountId, "Namespace": quicksightNamespace, "AuthorizedResourceArns": authorizedResourceArns, "AllowedDomains": allowedDomains, "ExperienceConfiguration": experienceConfiguration, "SessionTags": sessionTags, "SessionLifetimeInMinutes": 600 }; const quicksightClient = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: AccessKeyId, secretAccessKey: SecretAccessKey, sessionToken: SessionToken, expiration: Expiration } }); Embedding with the QuickSight APIs 1476 Amazon QuickSight User Guide quicksightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO SECURE ACCESS TO THIS API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } generateEmbedUrlForAnonymousUserCallback(result); } }); } Python3 import json import boto3 from botocore.exceptions import ClientError import time # Create QuickSight and STS clients quicksightClient = boto3.client('quicksight',region_name='us-west-2') sts = boto3.client('sts') # Function to generate embedded URL for anonymous user # accountId: YOUR AWS ACCOUNT ID # quicksightNamespace: VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING # authorizedResourceArns: DASHBOARD ARN LIST TO EMBED # allowedDomains: RUNTIME ALLOWED DOMAINS FOR EMBEDDING # dashboardId: DASHBOARD ID TO WHICH THE CONSTRUCTED URL POINTS # sessionTags: SESSION TAGS USED FOR ROW-LEVEL SECURITY def generateEmbedUrlForAnonymousUser(accountId, quicksightNamespace, authorizedResourceArns, allowedDomains, dashboardId, sessionTags): try: response = quicksightClient.generate_embed_url_for_anonymous_user( Embedding with the QuickSight APIs 1477 Amazon QuickSight User Guide AwsAccountId = accountId, Namespace = quicksightNamespace, AuthorizedResourceArns = authorizedResourceArns, AllowedDomains = allowedDomains, ExperienceConfiguration = { "Dashboard": { "InitialDashboardId": dashboardId } }, SessionTags = sessionTags, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow-Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: print(e) return "Error generating embeddedURL: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksightClient.generateEmbedUrlForAnonymousUser({ 'AwsAccountId': '111122223333', 'Namespace' : 'default', Embedding with the QuickSight APIs 1478 Amazon QuickSight User Guide 'AuthorizedResourceArns': authorizedResourceArns, 'AllowedDomains': allowedDomains, 'ExperienceConfiguration': experienceConfiguration, 'SessionTags': sessionTags, 'SessionLifetimeInMinutes': 600 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { Status: 200, EmbedUrl: 'https://quicksightdomain/embed/12345/dashboards/67890..', RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' } .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, sessionToken, Amazon.RegionEndpoint.USEast1); Embedding with the QuickSight APIs 1479 User Guide Amazon QuickSight try { Console.WriteLine( quicksightClient.GenerateEmbedUrlForAnonymousUserAsync(new GenerateEmbedUrlForAnonymousUserRequest { AwsAccountId = "111122223333", Namespace = default, AuthorizedResourceArns = authorizedResourceArns, AllowedDomains = allowedDomains, ExperienceConfiguration = experienceConfiguration, SessionTags = sessionTags, SessionLifetimeInMinutes = 600, }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you're using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you're using Security Assertion Markup Language (SAML) to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForAnonymousUser. aws sts assume-role \ --role-arn "arn:aws:iam::11112222333:role/QuickSightEmbeddingAnonymousPolicy" \ --role-session-name anonymous caller The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Embedding with the QuickSight APIs 1480 Amazon QuickSight Note User Guide If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you're using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_dashboard_role/QuickSightEmbeddingAnonymousPolicy. The role session ID is made |
amazon-quicksight-user-407 | amazon-quicksight-user.pdf | 407 | Note User Guide If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you're using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_dashboard_role/QuickSightEmbeddingAnonymousPolicy. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each visiting user. It also keeps each session separate and distinct. If you're using an array of web servers, for example for load balancing, and a session is reconnected to a different server, a new session begins. To get a signed URL for the dashboard, call generate-embed-url-for-anynymous-user from the app server. This returns the embeddable dashboard URL. The following example shows how to generate the URL for an embedded dashboard using a server-side call for users who are making anonymous visits to your web portal or app. aws quicksight generate-embed-url-for-anonymous-user \ --aws-account-id 111122223333 \ --namespace default-or-something-else \ --session-lifetime-in-minutes 15 \ --authorized-resource-arns '["dashboard-arn-1","dashboard-arn-2"]' \ --allowed-domains '["domain1","domain2"]' \ --session-tags '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag-key-1,"Value": tag- value-1}]' \ Embedding with the QuickSight APIs 1481 Amazon QuickSight --experience-configuration User Guide 'DashboardVisual={InitialDashboardVisualId={DashboardId=dashboard_id,SheetId=sheet_id,VisualId=visual_id}}' For more information about using this operation, see GenerateEmbedUrlForAnonymousUser. You can use this and other API operations in your own code. Step 3: Embed the dashboard URL Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following section, you can find out how you can use the QuickSight Embedding SDK (JavaScript) to embed the dashboard URL from step 2 in your website or application page. With the SDK, you can do the following: • Place the dashboard on an HTML page. • Pass parameters into the dashboard. • Handle error states with messages that are customized to your application. Call the GenerateEmbedUrlForAnynymousUser API operation to generate the URL that you can embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the URL with an auth_code that enables a single-sign on session. The following shows an example response from generate-embed-url-for-anynymous-user. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890..", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed this dashboard in your web page by using the QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those Embedding with the QuickSight APIs 1482 Amazon QuickSight User Guide and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of page load completion and errors. The domain that is going to host embedded dashboards must be on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded dashboards. For more information about adding domains for embedded dashboards, see Allow listing domains at runtime with the QuickSight API. The following example shows how to use the generated URL. This code resides on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Dashboard Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedDashboard = async() => { const { createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: '<YOUR_EMBED_URL>', container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { Embedding with the QuickSight APIs 1483 Amazon QuickSight User Guide console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { parameters: [ { Name: 'country', Values: [ 'United States' ], }, { Name: 'states', Values: [ 'California', 'Washington' ] } ], locale: "en-US", sheetOptions: { initialSheetId: '<YOUR_SHEETID>', singleSheet: false, emitSizeChangedEventOnSheetChange: false, }, toolbarOptions: { export: false, undoRedo: false, reset: false }, attributionOptions: { overlayContent: false, }, onMessage: async (messageEvent, experienceMetadata) => { Embedding with the QuickSight APIs 1484 Amazon QuickSight User Guide switch (messageEvent.eventName) { case 'CONTENT_LOADED': { console.log("All visuals are loaded. The title of the document:", messageEvent.message.title); |
amazon-quicksight-user-408 | amazon-quicksight-user.pdf | 408 | break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { parameters: [ { Name: 'country', Values: [ 'United States' ], }, { Name: 'states', Values: [ 'California', 'Washington' ] } ], locale: "en-US", sheetOptions: { initialSheetId: '<YOUR_SHEETID>', singleSheet: false, emitSizeChangedEventOnSheetChange: false, }, toolbarOptions: { export: false, undoRedo: false, reset: false }, attributionOptions: { overlayContent: false, }, onMessage: async (messageEvent, experienceMetadata) => { Embedding with the QuickSight APIs 1484 Amazon QuickSight User Guide switch (messageEvent.eventName) { case 'CONTENT_LOADED': { console.log("All visuals are loaded. The title of the document:", messageEvent.message.title); break; } case 'ERROR_OCCURRED': { console.log("Error occurred while rendering the experience. Error code:", messageEvent.message.errorCode); break; } case 'PARAMETERS_CHANGED': { console.log("Parameters changed. Changed parameters:", messageEvent.message.changedParameters); break; } case 'SELECTED_SHEET_CHANGED': { console.log("Selected sheet changed. Selected sheet:", messageEvent.message.selectedSheet); break; } case 'SIZE_CHANGED': { console.log("Size changed. New dimensions:", messageEvent.message); break; } case 'MODAL_OPENED': { window.scrollTo({ top: 0 // iframe top position }); break; } } }, }; const embeddedDashboardExperience = await embeddingContext.embedDashboard(frameOptions, contentOptions); const selectCountryElement = document.getElementById('country'); selectCountryElement.addEventListener('change', (event) => { embeddedDashboardExperience.setParameters([ { Name: 'country', Values: event.target.value Embedding with the QuickSight APIs 1485 User Guide Amazon QuickSight } ]); }); }; </script> </head> <body onload="embedDashboard()"> <span> <label for="country">Country</label> <select id="country" name="country"> <option value="United States">United States</option> <option value="Mexico">Mexico</option> <option value="Canada">Canada</option> </select> </span> <div id="experience-container"></div> </body> </html> SDK 1.0 <!DOCTYPE html> <html> <head> <title>Basic Embed</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var dashboard function onDashboardLoad(payload) { console.log("Do something when the dashboard is fully loaded."); } function onError(payload) { console.log("Do something when the dashboard fails loading"); } function embedDashboard() { var containerDiv = document.getElementById("embeddingContainer"); var options = { Embedding with the QuickSight APIs 1486 Amazon QuickSight User Guide // replace this dummy url with the one generated via embedding API url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", container: containerDiv, parameters: { country: "United States" }, scrolling: "no", height: "700px", width: "1000px", locale: "en-US", footerPaddingEnabled: true }; dashboard = QuickSightEmbedding.embedDashboard(options); dashboard.on("error", onError); dashboard.on("load", onDashboardLoad); } function onCountryChange(obj) { dashboard.setParameters({country: obj.value}); } </script> </head> <body onload="embedDashboard()"> <span> <label for="country">Country</label> <select id="country" name="country" onchange="onCountryChange(this)"> <option value="United States">United States</option> <option value="Mexico">Mexico</option> <option value="Canada">Canada</option> </select> </span> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the QuickSight Embedding SDK to load the embedded dashboard on your website using JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. Embedding with the QuickSight APIs 1487 Amazon QuickSight User Guide • Download the latest QuickSight Embedding SDK version from https://www.npmjs.com/package/ amazon-quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Enabling executive summaries in embedded dashboards Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers You can enable executive summaries in your embedded dashboards. When enabled, registered users can generate executive summaries that provide a summary of all insights that QuickSight has generated for the dashboard. Executive summaries make it easier for readers to find key insights and information about a dashboard. For more information about how users generate an executive summary of a dashboard, see Generate an executive summary of an Amazon QuickSight dashboard. Note Executive summaries are only available in embedded dashboards for registered users, and cannot be enabled in embedded dashboards for anonymous or unregistered users. To enable executive summaries in embedded dashboards for registered users • Follow the steps in Embedding QuickSight dashboards for registered users to embed a dashboard with the following changes: a. When generating the URL in Step 2, set Enabled: true in the ExecutiveSummary parameter in the GenerateEmbedUrlForRegisteredUser or GenerateEmbedUrlForRegisteredUserWithIdentity as shown in the following example: Embedding with the QuickSight APIs 1488 Amazon QuickSight User Guide ExperienceConfiguration: { Dashboard: { InitialDashboardId: dashboard_id, FeatureConfigurations: { AmazonQInQuickSight: { ExecutiveSummary: { Enabled: true } } } } } } b. When embedding the dashboard URL with the QuickSight Embedding SDK in Step 3, set executiveSummary: true in contentOptions, as shown in the following example: const contentOptions = { toolbarOptions: { executiveSummary: true } }; Embedding Amazon QuickSight visuals with the QuickSight APIs You can embed individual visuals that are a part of a published dashboard in your application with the Amazon QuickSight API. Topics • Embedding QuickSight visuals for registered users • Embedding QuickSight visuals for anonymous (unregistered) users Embedding QuickSight visuals for registered users Applies to: Enterprise Edition Embedding with the QuickSight APIs 1489 Amazon QuickSight User Guide Intended audience: Amazon QuickSight developers In the following sections, you can find detailed information about how to set up embedded Amazon QuickSight visuals for registered users of Amazon QuickSight. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the visual URL Step 1: Set up permissions In the |
amazon-quicksight-user-409 | amazon-quicksight-user.pdf | 409 | Amazon QuickSight API. Topics • Embedding QuickSight visuals for registered users • Embedding QuickSight visuals for anonymous (unregistered) users Embedding QuickSight visuals for registered users Applies to: Enterprise Edition Embedding with the QuickSight APIs 1489 Amazon QuickSight User Guide Intended audience: Amazon QuickSight developers In the following sections, you can find detailed information about how to set up embedded Amazon QuickSight visuals for registered users of Amazon QuickSight. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the visual URL Step 1: Set up permissions In the following section, you can find out how to set up permissions for the backend application or web server. This task requires administrative access to IAM. Each user who accesses a visual assumes a role that gives them Amazon QuickSight access and permissions to the visual. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. The IAM role needs to provide permissions to retrieve embedding URLs for a specific user pool. With the help of the wildcard character *, you can grant the permissions to generate a URL for all users in a specific namespace, or for a subset of users in specific namespaces. For this, you add quicksight:GenerateEmbedUrlForRegisteredUser. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The AllowedDomains parameter is an optional parameter. It grants you as a developer the option to override the static domains that are configured in the Manage QuickSight menu. Instead, you can list up to three domains or subdomains that can access a generated URL. This URL is then embedded in the website that you create. Only the domains that are listed in the parameter can access the embedded dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the AllowedDomains parameter, see GenerateEmbedUrlForRegisteredUser in the Amazon QuickSight API Reference. Embedding with the QuickSight APIs 1490 Amazon QuickSight User Guide The following sample policy provides these permissions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": "arn:partition:quicksight:region:accountId:user/namespace/userName", "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Additionally, if you are creating first-time users who will be Amazon QuickSight readers, make sure to add the quicksight:RegisterUser permission in the policy. The following sample policy provides permission to retrieve an embedding URL for first-time users who are to be QuickSight readers. { "Version": "2012-10-17", "Statement": [ { "Action": "quicksight:RegisterUser", "Resource": "*", "Effect": "Allow" }, { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForRegisteredUser" ], Embedding with the QuickSight APIs 1491 Amazon QuickSight "Resource": [ User Guide "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/ {{namespace}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-1}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-2}}" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Finally, your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" Embedding with the QuickSight APIs 1492 Amazon QuickSight } ] } User Guide For more information regarding trust policies for OpenID Connect or SAML authentication, see the following sections of the IAM User Guide: • Creating a Role for Web Identity or OpenID Connect Federation (Console) • Creating a Role for SAML 2.0 Federation (Console) Step 2: Generate the URL with the authentication code attached In the following section, you can find out how to authenticate your QuickSight user and get the embeddable visual URL on your application server. If you plan to embed visuals for IAM or QuickSight identity types, share the visual with the QuickSight users. When a QuickSight user accesses your app, the app assumes the IAM role on the QuickSight user's behalf. Then it adds the user to QuickSight, if that QuickSight user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing the described steps ensures that each viewer of the visual is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. The following examples perform the IAM authentication on the QuickSight user's behalf. This code runs on your app server. Java |
amazon-quicksight-user-410 | amazon-quicksight-user.pdf | 410 | the visual with the QuickSight users. When a QuickSight user accesses your app, the app assumes the IAM role on the QuickSight user's behalf. Then it adds the user to QuickSight, if that QuickSight user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing the described steps ensures that each viewer of the visual is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. The following examples perform the IAM authentication on the QuickSight user's behalf. This code runs on your app server. Java import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.DashboardVisualId; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult; import com.amazonaws.services.quicksight.model.RegisteredUserDashboardVisualEmbeddingConfiguration; Embedding with the QuickSight APIs 1493 Amazon QuickSight import User Guide com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration; import java.util.List; /** * Class to call QuickSight AWS SDK to get url for Visual embedding. */ public class GenerateEmbedUrlForRegisteredUserTest { private final AmazonQuickSight quickSightClient; public GenerateEmbedUrlForRegisteredUserTest() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret-key"); } @Override public void refresh() { } } ) .build(); } public String getEmbedUrl( final String accountId, // AWS Account ID final String dashboardId, // Dashboard ID of the dashboard to embed final String sheetId, // Sheet ID of the sheet to embed final String visualId, // Visual ID of the visual to embed final List<String> allowedDomains, // Runtime allowed domains for embedding final String userArn // Registered user arn of the user that you want to provide embedded visual. Refer to Get Embed Url section in developer portal to find out how to get user arn for a QuickSight user. ) throws Exception { final DashboardVisualId dashboardVisual = new DashboardVisualId() .withDashboardId(dashboardId) .withSheetId(sheetId) Embedding with the QuickSight APIs 1494 Amazon QuickSight User Guide .withVisualId(visualId); final RegisteredUserDashboardVisualEmbeddingConfiguration registeredUserDashboardVisualEmbeddingConfiguration = new RegisteredUserDashboardVisualEmbeddingConfiguration() .withInitialDashboardVisualId(dashboardVisual); final RegisteredUserEmbeddingExperienceConfiguration registeredUserEmbeddingExperienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration() .withDashboardVisual(registeredUserDashboardVisualEmbeddingConfiguration); final GenerateEmbedUrlForRegisteredUserRequest generateEmbedUrlForRegisteredUserRequest = new GenerateEmbedUrlForRegisteredUserRequest() .withAwsAccountId(accountId) .withUserArn(userArn) .withExperienceConfiguration(registeredUserEmbeddingExperienceConfiguration) .withAllowedDomains(allowedDomains); final GenerateEmbedUrlForRegisteredUserResult generateEmbedUrlForRegisteredUserResult = quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest); return generateEmbedUrlForRegisteredUserResult.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function generateEmbedUrlForRegisteredUser( accountId, // Your AWS account ID dashboardId, // Dashboard ID to which the constructed URL points sheetId, // Sheet ID to which the constructed URL points visualId, // Visual ID to which the constructed URL points openIdToken, // Cognito-based token userArn, // registered user arn roleArn, // IAM user role to use for embedding sessionName, // Session name for the roleArn assume role allowedDomains, // Runtime allowed domain for embedding getEmbedUrlCallback, // GetEmbedUrl success callback method Embedding with the QuickSight APIs 1495 Amazon QuickSight User Guide errorCallback // GetEmbedUrl error callback method ) { const stsClient = new AWS.STS(); let stsParams = { RoleSessionName: sessionName, WebIdentityToken: openIdToken, RoleArn: roleArn } stsClient.assumeRoleWithWebIdentity(stsParams, function(err, data) { if (err) { console.log('Error assuming role'); console.log(err, err.stack); errorCallback(err); } else { const getDashboardParams = { "AwsAccountId": accountId, "ExperienceConfiguration": { "DashboardVisual": { "InitialDashboardVisualId": { "DashboardId": dashboardId, "SheetId": sheetId, "VisualId": visualId } } }, "UserArn": userArn, "AllowedDomains": allowedDomains, "SessionLifetimeInMinutes": 600 }; const quicksightGetDashboard = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: data.Credentials.AccessKeyId, secretAccessKey: data.Credentials.SecretAccessKey, sessionToken: data.Credentials.SessionToken, expiration: data.Credentials.Expiration } }); quicksightGetDashboard.generateEmbedUrlForRegisteredUser(getDashboardParams, function(err, data) { Embedding with the QuickSight APIs 1496 Amazon QuickSight User Guide if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // Use your website domain to secure access to GetEmbedUrl API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } getEmbedUrlCallback(result); } }); } }); } Python3 import json import boto3 from botocore.exceptions import ClientError sts = boto3.client('sts') # Function to generate embedded URL # accountId: AWS account ID # dashboardId: Dashboard ID to embed # sheetId: SHEET ID to embed from the dashboard # visualId: Id for the Visual you want to embedded from the dashboard sheet. # userArn: arn of registered user # allowedDomains: Runtime allowed domain for embedding # roleArn: IAM user role to use for embedding # sessionName: session name for the roleArn assume role def getEmbeddingURL(accountId, dashboardId, sheetId, visualId, userArn, allowedDomains, roleArn, sessionName): try: assumedRole = sts.assume_role( RoleArn = roleArn, Embedding with the QuickSight APIs 1497 Amazon QuickSight User Guide RoleSessionName = sessionName, ) except ClientError as e: return "Error assuming role: " + str(e) else: assumedRoleSession = boto3.Session( aws_access_key_id = assumedRole['Credentials']['AccessKeyId'], aws_secret_access_key = assumedRole['Credentials']['SecretAccessKey'], aws_session_token = assumedRole['Credentials']['SessionToken'], ) try: quicksightClient = assumedRoleSession.client('quicksight', region_name='us- west-2') response = quicksightClient.generate_embed_url_for_registered_user( AwsAccountId=accountId, ExperienceConfiguration = { 'DashboardVisual': { 'InitialDashboardVisualId': { 'DashboardId': dashboardId, 'SheetId': sheetId, 'VisualId': visualId } }, }, UserArn = userArn, AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: return "Error generating embedding url: " + str(e) Embedding with the QuickSight APIs 1498 Amazon QuickSight Node.js User Guide The following example |
amazon-quicksight-user-411 | amazon-quicksight-user.pdf | 411 | as e: return "Error assuming role: " + str(e) else: assumedRoleSession = boto3.Session( aws_access_key_id = assumedRole['Credentials']['AccessKeyId'], aws_secret_access_key = assumedRole['Credentials']['SecretAccessKey'], aws_session_token = assumedRole['Credentials']['SessionToken'], ) try: quicksightClient = assumedRoleSession.client('quicksight', region_name='us- west-2') response = quicksightClient.generate_embed_url_for_registered_user( AwsAccountId=accountId, ExperienceConfiguration = { 'DashboardVisual': { 'InitialDashboardVisualId': { 'DashboardId': dashboardId, 'SheetId': sheetId, 'VisualId': visualId } }, }, UserArn = userArn, AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: return "Error generating embedding url: " + str(e) Embedding with the QuickSight APIs 1498 Amazon QuickSight Node.js User Guide The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksightClient.generateEmbedUrlForRegisteredUser({ 'AwsAccountId': '111122223333', 'ExperienceConfiguration': { 'DashboardVisual': { 'InitialDashboardVisualId': { 'DashboardId': 'dashboard_id', 'SheetId': 'sheet_id', 'VisualId': 'visual_id' } } }, 'UserArn': 'REGISTERED_USER_ARN', 'AllowedDomains': allowedDomains, 'SessionLifetimeInMinutes': 100 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { Embedding with the QuickSight APIs 1499 Amazon QuickSight "Status": "200", User Guide "EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890/ sheets/12345/visuals/67890...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; namespace GenerateDashboardEmbedUrlForRegisteredUser { class Program { static void Main(string[] args) { var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, SessionToken, Amazon.RegionEndpoint.USEast1); try { DashboardVisualId dashboardVisual = new DashboardVisualId { DashboardId = "dashboard_id", SheetId = "sheet_id", VisualId = "visual_id" }; RegisteredUserDashboardVisualEmbeddingConfiguration registeredUserDashboardVisualEmbeddingConfiguration = new RegisteredUserDashboardVisualEmbeddingConfiguration { Embedding with the QuickSight APIs 1500 Amazon QuickSight User Guide InitialDashboardVisualId = dashboardVisual }; RegisteredUserEmbeddingExperienceConfiguration registeredUserEmbeddingExperienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration { DashboardVisual = registeredUserDashboardVisualEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new GenerateEmbedUrlForRegisteredUserRequest { AwsAccountId = "111122223333", ExperienceConfiguration = registeredUserEmbeddingExperienceConfiguration, UserArn = "REGISTERED_USER_ARN", AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 100 }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you're using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you're using SAML to authenticate your users. Embedding with the QuickSight APIs 1501 Amazon QuickSight User Guide The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are taking a just-in-time approach to add users when they first open a dashboard, the role also needs permissions enabled for quicksight:RegisterUser. aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/embedding_quicksight_visual_role" \ --role-session-name [email protected] The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you're using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_visual_role/[email protected]. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. Embedding with the QuickSight APIs 1502 Amazon QuickSight User Guide The role session ID also becomes the user name in QuickSight. You can use this pattern to provision your users in QuickSight ahead of time, or to provision them the first time they access the dashboard. The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API Reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM \ --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_visual_role" \ --user-role READER \ --user-name jhnd \ --session-name "[email protected]" \ --email [email protected] \ --region us-east-1 \ --custom-permissions-name TeamA1 If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set |
amazon-quicksight-user-412 | amazon-quicksight-user.pdf | 412 | to provision your users in QuickSight ahead of time, or to provision them the first time they access the dashboard. The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API Reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM \ --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_visual_role" \ --user-role READER \ --user-name jhnd \ --session-name "[email protected]" \ --email [email protected] \ --region us-east-1 \ --custom-permissions-name TeamA1 If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set them up. Instead, they should be automatically subscribed the first time they access QuickSight. For Microsoft AD users, you can use DescribeUser to get the user ARN. The first time a user accesses QuickSight, you can also add this user to the group that the visual is shared with. The following example shows the CLI command to add a user to a group. aws quicksight create-group-membership \ --aws-account-id=111122223333 \ --namespace=default \ --group-name=financeusers \ --member-name="embedding_quicksight_visual_role/[email protected]" You now have a user of your app who is also a user of QuickSight, and who has access to the visual. Finally, to get a signed URL for the visual, call generate-embed-url-for-registered-user from the app server. This returns the embeddable visual URL. The following example shows how to generate the URL for an embedded visual using a server-side call for users authenticated through AWS Managed Microsoft AD or single sign-on (IAM Identity Center). aws quicksight generate-embed-url-for-registered-user \ Embedding with the QuickSight APIs 1503 Amazon QuickSight User Guide --aws-account-id 111122223333 \ --session-lifetime-in-minutes 600 \ --user-arn arn:aws:quicksight:us-east-1:111122223333:user/default/ embedding_quicksight_visual_role/embeddingsession \ --allowed-domains '["domain1","domain2"]' \ --experience-configuration 'DashboardVisual={InitialDashboardVisualId={DashboardId=dashboard_id,SheetId=sheet_id,VisualId=visual_id}}' For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can use this and other API operations in your own code. Step 3: Embed the visual URL In the following section, you can find out how you can use the Amazon QuickSight Embedding SDK (JavaScript) to embed the visual URL from step 3 in your website or application page. With the SDK, you can do the following: • Place the visual on an HTML page. • Pass parameters into the visual. • Handle error states with messages that are customized to your application. Call the GenerateEmbedUrlForRegisteredUser API operation to generate the URL that you can embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours. The API operation provides the URL with an auth_code that enables a single-sign on session. The following shows an example response from generate-embed-url-for-registered- user. The quicksightdomain in this example is the URL that you use to access your QuickSight account. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890/ sheets/12345/visuals/67890...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" Embedding with the QuickSight APIs 1504 Amazon QuickSight } User Guide Embed this visual in your webpage by using the QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the Amazon QuickSight Embedding SDK, you can also control parameters within the visual and receive callbacks in terms of page load completion and errors. The domain that is going to host embedded visuals and dashboards must be on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded visuals and dashboards. For more information about adding domains for embedded visuals and dashboards, see Allow listing domains at runtime with the QuickSight API. The following example shows how to use the generated URL. This code is generated on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Visual Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedVisual = async() => { const { createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { Embedding with the QuickSight APIs 1505 Amazon QuickSight User Guide url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { parameters: [ { Name: 'country', Values: ['United States'], }, { Name: 'states', Values: [ 'California', 'Washington' ] } ], locale: "en-US", onMessage: async (messageEvent, |
amazon-quicksight-user-413 | amazon-quicksight-user.pdf | 413 | }, }); const frameOptions = { Embedding with the QuickSight APIs 1505 Amazon QuickSight User Guide url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { parameters: [ { Name: 'country', Values: ['United States'], }, { Name: 'states', Values: [ 'California', 'Washington' ] } ], locale: "en-US", onMessage: async (messageEvent, experienceMetadata) => { switch (messageEvent.eventName) { case 'CONTENT_LOADED': { console.log("All visuals are loaded. The title of the document:", messageEvent.message.title); break; } case 'ERROR_OCCURRED': { Embedding with the QuickSight APIs 1506 Amazon QuickSight User Guide console.log("Error occured while rendering the experience. Error code:", messageEvent.message.errorCode); break; } case 'PARAMETERS_CHANGED': { console.log("Parameters changed. Changed parameters:", messageEvent.message.changedParameters); break; } case 'SIZE_CHANGED': { console.log("Size changed. New dimensions:", messageEvent.message); break; } } }, }; const embeddedVisualExperience = await embeddingContext.embedVisual(frameOptions, contentOptions); const selectCountryElement = document.getElementById('country'); selectCountryElement.addEventListener('change', (event) => { embeddedVisualExperience.setParameters([ { Name: 'country', Values: event.target.value } ]); }); }; </script> </head> <body onload="embedVisual()"> <span> <label for="country">Country</label> <select id="country" name="country"> <option value="United States">United States</option> <option value="Mexico">Mexico</option> <option value="Canada">Canada</option> </select> </span> <div id="experience-container"></div> </body> Embedding with the QuickSight APIs 1507 Amazon QuickSight </html> SDK 1.0 <!DOCTYPE html> <html> <head> User Guide <title>Visual Embedding Example</title> <!-- You can download the latest QuickSight embedding SDK version from https:// www.npmjs.com/package/amazon-quicksight-embedding-sdk --> <!-- Or you can do "npm install amazon-quicksight-embedding-sdk", if you use npm for javascript dependencies --> <script src="./quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> let embeddedVisualExperience; function onVisualLoad(payload) { console.log("Do something when the visual is fully loaded."); } function onError(payload) { console.log("Do something when the visual fails loading"); } function embedVisual() { const containerDiv = document.getElementById("embeddingContainer"); const options = { url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: containerDiv, parameters: { country: "United States" }, height: "700px", width: "1000px", locale: "en-US" }; embeddedVisualExperience = QuickSightEmbedding.embedVisual(options); embeddedVisualExperience.on("error", onError); embeddedVisualExperience.on("load", onVisualLoad); } Embedding with the QuickSight APIs 1508 Amazon QuickSight User Guide function onCountryChange(obj) { embeddedVisualExperience.setParameters({country: obj.value}); } </script> </head> <body onload="embedVisual()"> <span> <label for="country">Country</label> <select id="country" name="country" onchange="onCountryChange(this)"> <option value="United States">United States</option> <option value="Mexico">Mexico</option> <option value="Canada">Canada</option> </select> </span> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded visual on your website using JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Embedding QuickSight visuals for anonymous (unregistered) users Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers Embedding with the QuickSight APIs 1509 Amazon QuickSight User Guide In the following sections, you can find detailed information about how to set up embedded Amazon QuickSight visuals for anonymous (unregistered) users. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the visual URL Step 1: Set up permissions Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following section, you can find out how to set up permissions for the backend application or web server. This task requires administrative access to IAM. Each user who accesses a visual assumes a role that gives them Amazon QuickSight access and permissions to the visual. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The AllowedDomains parameter is an optional parameter. It grants you as a developer the option to override the static domains that are configured in the Manage QuickSight menu. Instead, you can list up to three domains or subdomains that can access a generated URL. This URL is then embedded in the website that you create. Only the domains that are listed in the parameter can access the embedded dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the AllowedDomains parameter, see GenerateEmbedUrlForAnonymousUser in the Amazon QuickSight API Reference. Embedding with the QuickSight APIs 1510 Amazon QuickSight User Guide The following sample policy provides these permissions for use with GenerateEmbedUrlForAnonymousUser. For this approach to work, you also need a |
amazon-quicksight-user-414 | amazon-quicksight-user.pdf | 414 | embedded in the website that you create. Only the domains that are listed in the parameter can access the embedded dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the AllowedDomains parameter, see GenerateEmbedUrlForAnonymousUser in the Amazon QuickSight API Reference. Embedding with the QuickSight APIs 1510 Amazon QuickSight User Guide The following sample policy provides these permissions for use with GenerateEmbedUrlForAnonymousUser. For this approach to work, you also need a session pack, or session capacity pricing, for your AWS account. Otherwise, when a user tries to access the visual, the error UnsupportedPricingPlanException is returned. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForAnonymousUser" ], "Resource": [ "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/ {{namespace}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-1}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-2}}" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } } Your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf to open the visual. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", Embedding with the QuickSight APIs 1511 Amazon QuickSight User Guide "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } For more information regarding trust policies, see Temporary security credentials in IAM in the IAM User Guide. Step 2: Generate the URL with the authentication code attached Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following section, you can find how to authenticate on behalf of the anonymous visitor and get the embeddable visual URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. The following examples perform the IAM authentication on the user's behalf. It passes an identifier as the unique role session ID. This code runs on your app server. Java import com.amazonaws.auth.AWSCredentials; Embedding with the QuickSight APIs 1512 Amazon QuickSight User Guide import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.AnonymousUserDashboardVisualEmbeddingConfiguration; import com.amazonaws.services.quicksight.model.AnonymousUserEmbeddingExperienceConfiguration; import com.amazonaws.services.quicksight.model.DashboardVisualId; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserResult; import com.amazonaws.services.quicksight.model.SessionTag; import java.util.List; /** * Class to call QuickSight AWS SDK to get url for Visual embedding. */ public class GenerateEmbedUrlForAnonymousUserTest { private final AmazonQuickSight quickSightClient; public GenerateEmbedUrlForAnonymousUserTest() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret-key"); } @Override public void refresh() { } } ) .build(); } public String getEmbedUrl( final String accountId, // AWS Account ID Embedding with the QuickSight APIs 1513 Amazon QuickSight User Guide final String namespace, // Anonymous embedding required specifying a valid namespace for which you want the enbedding URL final List<String> authorizedResourceArns, // Dashboard arn list of dashboard visuals to embed final String dashboardId, // Dashboard ID of the dashboard to embed final String sheetId, // Sheet ID of the sheet to embed final String visualId, // Visual ID of the visual to embed final List<String> allowedDomains, // Runtime allowed domains for embedding final List<SessionTag> sessionTags // Session tags used for row-level security ) throws Exception { final DashboardVisualId dashboardVisual = new DashboardVisualId() .withDashboardId(dashboardId) .withSheetId(sheetId) .withVisualId(visualId); final AnonymousUserDashboardVisualEmbeddingConfiguration anonymousUserDashboardVisualEmbeddingConfiguration = new AnonymousUserDashboardVisualEmbeddingConfiguration() .withInitialDashboardVisualId(dashboardVisual); final AnonymousUserEmbeddingExperienceConfiguration anonymousUserEmbeddingExperienceConfiguration = new AnonymousUserEmbeddingExperienceConfiguration() .withDashboardVisual(anonymousUserDashboardVisualEmbeddingConfiguration); final GenerateEmbedUrlForAnonymousUserRequest generateEmbedUrlForAnonymousUserRequest = new GenerateEmbedUrlForAnonymousUserRequest() .withAwsAccountId(accountId) .withNamespace(namespace) // authorizedResourceArns should contain ARN of dashboard used below in ExperienceConfiguration .withAuthorizedResourceArns(authorizedResourceArns) .withExperienceConfiguration(anonymousUserEmbeddingExperienceConfiguration) .withAllowedDomains(allowedDomains) .withSessionTags(sessionTags) .withSessionLifetimeInMinutes(600L); final GenerateEmbedUrlForAnonymousUserResult generateEmbedUrlForAnonymousUserResult = quickSightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserRequest); return generateEmbedUrlForAnonymousUserResult.getEmbedUrl(); Embedding with the QuickSight APIs 1514 Amazon QuickSight } } JavaScript User Guide global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function generateEmbedUrlForAnonymousUser( accountId, // Your AWS account ID dashboardId, // Dashboard ID to which the constructed url points sheetId, // Sheet ID to which the constructed url points visualId, // Visual ID to which the constructed url points quicksightNamespace, // valid namespace where you want to do embedding authorizedResourceArns, // dashboard arn list of dashboard visuals to embed allowedDomains, // runtime allowed domains for embedding sessionTags, // session tags used for row-level security generateEmbedUrlForAnonymousUserCallback, // success callback method errorCallback // error callback method ) { const experienceConfiguration = { "DashboardVisual": { "InitialDashboardVisualId": { "DashboardId": dashboardId, "SheetId": sheetId, "VisualId": visualId } } }; const generateEmbedUrlForAnonymousUserParams = { "AwsAccountId": accountId, "Namespace": quicksightNamespace, // authorizedResourceArns should contain ARN of dashboard used below in ExperienceConfiguration "AuthorizedResourceArns": authorizedResourceArns, "AllowedDomains": allowedDomains, "ExperienceConfiguration": experienceConfiguration, "SessionTags": sessionTags, "SessionLifetimeInMinutes": 600 }; const quicksightClient = |
amazon-quicksight-user-415 | amazon-quicksight-user.pdf | 415 | constructed url points quicksightNamespace, // valid namespace where you want to do embedding authorizedResourceArns, // dashboard arn list of dashboard visuals to embed allowedDomains, // runtime allowed domains for embedding sessionTags, // session tags used for row-level security generateEmbedUrlForAnonymousUserCallback, // success callback method errorCallback // error callback method ) { const experienceConfiguration = { "DashboardVisual": { "InitialDashboardVisualId": { "DashboardId": dashboardId, "SheetId": sheetId, "VisualId": visualId } } }; const generateEmbedUrlForAnonymousUserParams = { "AwsAccountId": accountId, "Namespace": quicksightNamespace, // authorizedResourceArns should contain ARN of dashboard used below in ExperienceConfiguration "AuthorizedResourceArns": authorizedResourceArns, "AllowedDomains": allowedDomains, "ExperienceConfiguration": experienceConfiguration, "SessionTags": sessionTags, "SessionLifetimeInMinutes": 600 }; const quicksightClient = new AWS.QuickSight({ Embedding with the QuickSight APIs 1515 Amazon QuickSight User Guide region: process.env.AWS_REGION, credentials: { accessKeyId: AccessKeyId, secretAccessKey: SecretAccessKey, sessionToken: SessionToken, expiration: Expiration } }); quicksightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO SECURE ACCESS TO THIS API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } generateEmbedUrlForAnonymousUserCallback(result); } }); } Python3 import json import boto3 from botocore.exceptions import ClientError import time # Create QuickSight and STS clients quicksightClient = boto3.client('quicksight',region_name='us-west-2') sts = boto3.client('sts') # Function to generate embedded URL for anonymous user Embedding with the QuickSight APIs 1516 Amazon QuickSight User Guide # accountId: YOUR AWS ACCOUNT ID # quicksightNamespace: VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING # authorizedResourceArns: DASHBOARD ARN LIST TO EMBED # allowedDomains: RUNTIME ALLOWED DOMAINS FOR EMBEDDING # experienceConfiguration: DASHBOARD ID, SHEET ID and VISUAL ID TO WHICH THE CONSTRUCTED URL POINTS # Example experienceConfig -> 'DashboardVisual': { # 'InitialDashboardVisualId': { # 'DashboardId': 'dashboardId', # 'SheetId': 'sheetId', # 'VisualId': 'visualId' # } # }, # sessionTags: SESSION TAGS USED FOR ROW-LEVEL SECURITY def generateEmbedUrlForAnonymousUser(accountId, quicksightNamespace, authorizedResourceArns, allowedDomains, experienceConfiguration, sessionTags): try: response = quicksightClient.generate_embed_url_for_anonymous_user( AwsAccountId = accountId, Namespace = quicksightNamespace, AuthorizedResourceArns = authorizedResourceArns, AllowedDomains = allowedDomains, ExperienceConfiguration = experienceConfiguration, SessionTags = sessionTags, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: print(e) return "Error generating embeddedURL: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Embedding with the QuickSight APIs 1517 Amazon QuickSight Example const AWS = require('aws-sdk'); const https = require('https'); User Guide var quicksightClient = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksightClient.generateEmbedUrlForAnonymousUser({ 'AwsAccountId': '111122223333', 'Namespace' : 'default', // authorizedResourceArns should contain ARN of dashboard used below in ExperienceConfiguration 'AuthorizedResourceArns': authorizedResourceArns, 'ExperienceConfiguration': { 'DashboardVisual': { 'InitialDashboardVisualId': { 'DashboardId': 'dashboard_id', 'SheetId': 'sheet_id', 'VisualId': 'visual_id' } } }, 'AllowedDomains': allowedDomains, 'SessionTags': sessionTags, 'SessionLifetimeInMinutes': 600 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", Embedding with the QuickSight APIs 1518 Amazon QuickSight User Guide "EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890/ sheets/12345/visuals/67890...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; namespace GenerateDashboardEmbedUrlForAnonymousUser { class Program { static void Main(string[] args) { var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, SessionToken, Amazon.RegionEndpoint.USEast1); try { DashboardVisualId dashboardVisual = new DashboardVisualId { DashboardId = "dashboard_id", SheetId = "sheet_id", VisualId = "visual_id" }; AnonymousUserDashboardVisualEmbeddingConfiguration anonymousUserDashboardVisualEmbeddingConfiguration = new AnonymousUserDashboardVisualEmbeddingConfiguration { InitialDashboardVisualId = dashboardVisual Embedding with the QuickSight APIs 1519 Amazon QuickSight User Guide }; AnonymousUserEmbeddingExperienceConfiguration anonymousUserEmbeddingExperienceConfiguration = new AnonymousUserEmbeddingExperienceConfiguration { DashboardVisual = anonymousUserDashboardVisualEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForAnonymousUserAsync(new GenerateEmbedUrlForAnonymousUserRequest { AwsAccountId = "111222333444", Namespace = default, // authorizedResourceArns should contain ARN of dashboard used below in ExperienceConfiguration AuthorizedResourceArns = { "dashboard_id" }, ExperienceConfiguration = anonymousUserEmbeddingExperienceConfiguration, SessionTags = sessionTags, SessionLifetimeInMinutes = 600, }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you're using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you're using Security Assertion Markup Language (SAML) to authenticate your users. Embedding with the QuickSight APIs 1520 Amazon QuickSight User Guide The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForAnonymousUser. aws sts assume-role \ --role-arn "arn:aws:iam::11112222333:role/QuickSightEmbeddingAnonymousPolicy" \ --role-session-name anonymous caller The assume-role operation returns three output parameters: the access key, the secret key, and the session token. |
amazon-quicksight-user-416 | amazon-quicksight-user.pdf | 416 | an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you're using Security Assertion Markup Language (SAML) to authenticate your users. Embedding with the QuickSight APIs 1520 Amazon QuickSight User Guide The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForAnonymousUser. aws sts assume-role \ --role-arn "arn:aws:iam::11112222333:role/QuickSightEmbeddingAnonymousPolicy" \ --role-session-name anonymous caller The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you're using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_visual_role/QuickSightEmbeddingAnonymousPolicy. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each visiting user. It also keeps each session separate and distinct. If you're using an array of web servers, for example for load balancing, and a session is reconnected to a different server, a new session begins. To get a signed URL for the visual, call generate-embed-url-for-anynymous-user from the app server. This returns the embeddable visual URL. The following example shows how to generate Embedding with the QuickSight APIs 1521 Amazon QuickSight User Guide the URL for an embedded visual using a server-side call for users who are making anonymous visits to your web portal or app. aws quicksight generate-embed-url-for-anonymous-user \ --aws-account-id 111122223333 \ --namespace default-or-something-else \ --session-lifetime-in-minutes 15 \ --authorized-resource-arns '["dashboard-arn-1","dashboard-arn-2"]' \ --allowed-domains '["domain1","domain2"]' \ --session-tags '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag- key-1,"Value": tag-value-1}]' \ --experience-configuration 'DashboardVisual={InitialDashboardVisualId={DashboardId=dashboard_id,SheetId=sheet_id,VisualId=visual_id}}' For more information about using this operation, see GenerateEmbedUrlForAnonymousUser. You can use this and other API operations in your own code. Step 3: Embed the visual URL Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following section, you can find out how you can use the QuickSight Embedding SDK (JavaScript) to embed the visual URL from step 2 in your website or application page. With the SDK, you can do the following: • Place the visual on an HTML page. • Pass parameters into the visual. • Handle error states with messages that are customized to your application. Call the GenerateEmbedUrlForAnonymousUser API operation to generate the URL that you can embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the URL with an authorization (auth) code that enables a single-sign on session. Embedding with the QuickSight APIs 1522 Amazon QuickSight User Guide The following shows an example response from generate-embed-url-for-anonymous- user. The quicksightdomain in this example is the URL that you use to access your QuickSight account. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https://quicksightdomain/embed/12345/dashboards/67890/ sheets/12345/visuals/67890...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed this visual in your web page by using the QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the QuickSight Embedding SDK, you can also control parameters within the visual and receive callbacks in terms of visual load completion and errors. The domain that is going to host embedded visual must be on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded visuals and dashboards. For more information about adding domains for embedded visuals and dashboards, see Allow listing domains at runtime with the QuickSight API. The following example shows how to use the generated URL. This code resides on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Visual Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedVisual = async() => { const { Embedding with the QuickSight APIs 1523 Amazon QuickSight User Guide createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: "<YOUR_EMBED_URL>", // replace this |
amazon-quicksight-user-417 | amazon-quicksight-user.pdf | 417 | more information about adding domains for embedded visuals and dashboards, see Allow listing domains at runtime with the QuickSight API. The following example shows how to use the generated URL. This code resides on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Visual Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedVisual = async() => { const { Embedding with the QuickSight APIs 1523 Amazon QuickSight User Guide createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { parameters: [ { Name: 'country', Values: ['United States'], }, { Name: 'states', Values: [ 'California', 'Washington' ] Embedding with the QuickSight APIs 1524 Amazon QuickSight User Guide } ], locale: "en-US", onMessage: async (messageEvent, experienceMetadata) => { switch (messageEvent.eventName) { case 'CONTENT_LOADED': { console.log("All visuals are loaded. The title of the document:", messageEvent.message.title); break; } case 'ERROR_OCCURRED': { console.log("Error occured while rendering the experience. Error code:", messageEvent.message.errorCode); break; } case 'PARAMETERS_CHANGED': { console.log("Parameters changed. Changed parameters:", messageEvent.message.changedParameters); break; } case 'SIZE_CHANGED': { console.log("Size changed. New dimensions:", messageEvent.message); break; } } }, }; const embeddedVisualExperience = await embeddingContext.embedVisual(frameOptions, contentOptions); const selectCountryElement = document.getElementById('country'); selectCountryElement.addEventListener('change', (event) => { embeddedVisualExperience.setParameters([ { Name: 'country', Values: event.target.value } ]); }); }; </script> </head> Embedding with the QuickSight APIs 1525 Amazon QuickSight User Guide <body onload="embedVisual()"> <span> <label for="country">Country</label> <select id="country" name="country"> <option value="United States">United States</option> <option value="Mexico">Mexico</option> <option value="Canada">Canada</option> </select> </span> <div id="experience-container"></div> </body> </html> SDK 1.0 <!DOCTYPE html> <html> <head> <title>Visual Embedding Example</title> <!-- You can download the latest QuickSight embedding SDK version from https:// www.npmjs.com/package/amazon-quicksight-embedding-sdk --> <!-- Or you can do "npm install amazon-quicksight-embedding-sdk", if you use npm for javascript dependencies --> <script src="./quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> let embeddedVisualExperience; function onVisualLoad(payload) { console.log("Do something when the visual is fully loaded."); } function onError(payload) { console.log("Do something when the visual fails loading"); } function embedVisual() { const containerDiv = document.getElementById("embeddingContainer"); const options = { url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: containerDiv, parameters: { Embedding with the QuickSight APIs 1526 Amazon QuickSight User Guide country: "United States" }, height: "700px", width: "1000px", locale: "en-US" }; embeddedVisualExperience = QuickSightEmbedding.embedVisual(options); embeddedVisualExperience.on("error", onError); embeddedVisualExperience.on("load", onVisualLoad); } function onCountryChange(obj) { embeddedVisualExperience.setParameters({country: obj.value}); } </script> </head> <body onload="embedVisual()"> <span> <label for="country">Country</label> <select id="country" name="country" onchange="onCountryChange(this)"> <option value="United States">United States</option> <option value="Mexico">Mexico</option> <option value="Canada">Canada</option> </select> </span> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded visual on your website using JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest QuickSight embedding SDK version from https://www.npmjs.com/package/ amazon-quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. Embedding with the QuickSight APIs 1527 Amazon QuickSight User Guide npm install amazon-quicksight-embedding-sdk Embedding the full functionality of the Amazon QuickSight console for registered users Important Amazon QuickSight has new API operations for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl API operations to embed dashboards and the QuickSight console, but they don't contain the latest embedding capabilities. For more information about embedding using the old API operations, see Embedding analytics using the GetDashboardEmbedURL and GetSessionEmbedURL API operations. Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers With Enterprise edition, in addition to providing read-only dashboards you can also provide the Amazon QuickSight console experience in a custom-branded authoring portal. Using this approach, you allow your users to create data sources, datasets, and analyses. In the same interface, they can create, publish, and view dashboards. If you want to restrict some of those permissions, you can also do that. Users who access QuickSight through an embedded console need to belong to the author or admin security cohort. Readers don't have enough access to use the QuickSight console for authoring, regardless of whether it's embedded or part of the AWS Management Console. However, authors and admins can still access embedded dashboards. If you want to restrict permissions to some of the authoring features, you can add a custom permissions profile to the user with the UpdateUser API operation. Use the RegisterUser API operation to add a new user with a custom permission profile attached. For more information, see the following sections: Embedding with the QuickSight |
amazon-quicksight-user-418 | amazon-quicksight-user.pdf | 418 | an embedded console need to belong to the author or admin security cohort. Readers don't have enough access to use the QuickSight console for authoring, regardless of whether it's embedded or part of the AWS Management Console. However, authors and admins can still access embedded dashboards. If you want to restrict permissions to some of the authoring features, you can add a custom permissions profile to the user with the UpdateUser API operation. Use the RegisterUser API operation to add a new user with a custom permission profile attached. For more information, see the following sections: Embedding with the QuickSight APIs 1528 Amazon QuickSight User Guide • For information about creating custom roles by defining custom console permissions, see Customizing Access to the QuickSight Console. • For information about using namespaces to isolate multitenancy users, groups, and QuickSight assets, see QuickSight Namespaces. • For information about adding your own branding to an embedded QuickSight console, see Using Themes in QuickSight and the QuickSight Theme API Operations. In the following sections, you can find detailed information about how to set up embedded Amazon QuickSight dashboards for registered users. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the console session URL • Enabling Generative BI features in embedded consoles for registered users Step 1: Set up permissions In the following section, you can find out how to set up permissions for the backend application or web server. This task requires administrative access to IAM. Each user who accesses a QuickSight assumes a role that gives them Amazon QuickSight access and permissions to the console session. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. Add quicksight:RegisterUser permissions to ensure that the reader can access QuickSight in a read-only fashion, and not have access to any other data or creation capability. The IAM role also needs to provide permissions to retrieve console session URLs. For this, you add quicksight:GenerateEmbedUrlForRegisteredUser. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The AllowedDomains parameter is an optional parameter. It grants you as a developer the option to override the static domains that are configured in the Manage QuickSight menu. Instead, you can list up to three domains or subdomains that can access a generated URL. This URL is then embedded in the website that you create. Only the domains that are listed in the parameter can Embedding with the QuickSight APIs 1529 Amazon QuickSight User Guide access the embedded dashboard. Without this condition, you can list any domain on the internet in the AllowedDomains parameter. The following sample policy provides these permissions. { "Version": "2012-10-17", "Statement": [ { "Action": "quicksight:RegisterUser", "Resource": "*", "Effect": "Allow" }, { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": [ "arn:partition:quicksight:region:accountId:user/namespace/userName" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } The following sample policy provides permission to retrieve a console session URL. You can use the policy without quicksight:RegisterUser if you are creating users before they access an embedded session. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", Embedding with the QuickSight APIs 1530 Amazon QuickSight "Action": [ User Guide "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": [ "arn:partition:quicksight:region:accountId:user/namespace/userName" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Finally, your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] Embedding with the QuickSight APIs 1531 Amazon QuickSight } User Guide For more information regarding trust policies for OpenID Connect or SAML authentication, see the following sections of the IAM User Guide: • Creating a Role for Web Identity or OpenID Connect Federation (Console) • Creating a Role for SAML 2.0 Federation (Console) Step 2: Generate the URL with the authentication code attached In the following section, you can find out how to authenticate your user and get the embeddable console session URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing |
amazon-quicksight-user-419 | amazon-quicksight-user.pdf | 419 | the IAM User Guide: • Creating a Role for Web Identity or OpenID Connect Federation (Console) • Creating a Role for SAML 2.0 Federation (Console) Step 2: Generate the URL with the authentication code attached In the following section, you can find out how to authenticate your user and get the embeddable console session URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing the described steps ensures that each viewer of the console session is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. The following examples perform the IAM authentication on the user's behalf. This code runs on your app server. Java import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult; import com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration; import com.amazonaws.services.quicksight.model.RegisteredUserQuickSightConsoleEmbeddingConfiguration; /** * Class to call QuickSight AWS SDK to get url for QuickSight console embedding. Embedding with the QuickSight APIs 1532 User Guide Amazon QuickSight */ public class GetQuicksightEmbedUrlRegisteredUserQSConsoleEmbedding { private final AmazonQuickSight quickSightClient; public GetQuicksightEmbedUrlRegisteredUserQSConsoleEmbedding() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret-key"); } @Override public void refresh() { } } ) .build(); } public String getQuicksightEmbedUrl( final String accountId, final String userArn, // Registered user arn to use for embedding. Refer to Get Embed Url section in developer portal to find out how to get user arn for a QuickSight user. final List<String> allowedDomains, // Runtime allowed domain for embedding final String initialPath ) throws Exception { final RegisteredUserEmbeddingExperienceConfiguration experienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration() .withQuickSightConsole(new RegisteredUserQuickSightConsoleEmbeddingConfiguration().withInitialPath(initialPath)); final GenerateEmbedUrlForRegisteredUserRequest generateEmbedUrlForRegisteredUserRequest = new GenerateEmbedUrlForRegisteredUserRequest(); generateEmbedUrlForRegisteredUserRequest.setAwsAccountId(accountId); generateEmbedUrlForRegisteredUserRequest.setUserArn(userArn); generateEmbedUrlForRegisteredUserRequest.setAllowedDomains(allowedDomains); generateEmbedUrlForRegisteredUserRequest.setExperienceConfiguration(experienceConfiguration); Embedding with the QuickSight APIs 1533 Amazon QuickSight User Guide final GenerateEmbedUrlForRegisteredUserResult generateEmbedUrlForRegisteredUserResult = quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest); return generateEmbedUrlForRegisteredUserResult.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function generateEmbedUrlForRegisteredUser( accountId, dashboardId, openIdToken, // Cognito-based token userArn, // registered user arn roleArn, // IAM user role to use for embedding sessionName, // Session name for the roleArn assume role allowedDomains, // Runtime allowed domain for embedding getEmbedUrlCallback, // GetEmbedUrl success callback method errorCallback // GetEmbedUrl error callback method ) { const stsClient = new AWS.STS(); let stsParams = { RoleSessionName: sessionName, WebIdentityToken: openIdToken, RoleArn: roleArn } stsClient.assumeRoleWithWebIdentity(stsParams, function(err, data) { if (err) { console.log('Error assuming role'); console.log(err, err.stack); errorCallback(err); } else { const getDashboardParams = { "AwsAccountId": accountId, "ExperienceConfiguration": { "QuickSightConsole": { "InitialPath": '/start' Embedding with the QuickSight APIs 1534 Amazon QuickSight User Guide } }, "UserArn": userArn, "AllowedDomains": allowedDomains, "SessionLifetimeInMinutes": 600 }; const quicksightGetDashboard = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: data.Credentials.AccessKeyId, secretAccessKey: data.Credentials.SecretAccessKey, sessionToken: data.Credentials.SessionToken, expiration: data.Credentials.Expiration } }); quicksightGetDashboard.generateEmbedUrlForRegisteredUser(getDashboardParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // Use your website domain to secure access to GetEmbedUrl API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } getEmbedUrlCallback(result); } }); } }); } Embedding with the QuickSight APIs 1535 User Guide Amazon QuickSight Python3 import json import boto3 from botocore.exceptions import ClientError # Create QuickSight and STS clients qs = boto3.client('quicksight', region_name='us-east-1') sts = boto3.client('sts') # Function to generate embedded URL # accountId: AWS account ID # userArn: arn of registered user # allowedDomains: Runtime allowed domain for embedding # roleArn: IAM user role to use for embedding # sessionName: session name for the roleArn assume role def generateEmbeddingURL(accountId, userArn, allowedDomains, roleArn, sessionName): try: assumedRole = sts.assume_role( RoleArn = roleArn, RoleSessionName = sessionName, ) except ClientError as e: return "Error assuming role: " + str(e) else: assumedRoleSession = boto3.Session( aws_access_key_id = assumedRole['Credentials']['AccessKeyId'], aws_secret_access_key = assumedRole['Credentials']['SecretAccessKey'], aws_session_token = assumedRole['Credentials']['SessionToken'], ) try: quickSightClient = assumedRoleSession.client('quicksight', region_name='us- east-1') experienceConfiguration = { "QuickSightConsole": { "InitialPath": "/start" } } response = quickSightClient.generate_embed_url_for_registered_user( AwsAccountId = accountId, ExperienceConfiguration = experienceConfiguration, UserArn = userArn, AllowedDomains = allowedDomains, Embedding with the QuickSight APIs 1536 Amazon QuickSight User Guide SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: return "Error generating embedding url: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded console session. You can use this URL in your website or app to display the console session. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksightClient.generateEmbedUrlForRegisteredUser({ 'AwsAccountId': '111122223333', 'ExperienceConfiguration': { 'QuickSightConsole': { 'InitialPath': '/start' } }, 'UserArn': 'REGISTERED_USER_ARN', 'AllowedDomains': allowedDomains, 'SessionLifetimeInMinutes': 100 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); Embedding with |
amazon-quicksight-user-420 | amazon-quicksight-user.pdf | 420 | } except ClientError as e: return "Error generating embedding url: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded console session. You can use this URL in your website or app to display the console session. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksightClient.generateEmbedUrlForRegisteredUser({ 'AwsAccountId': '111122223333', 'ExperienceConfiguration': { 'QuickSightConsole': { 'InitialPath': '/start' } }, 'UserArn': 'REGISTERED_USER_ARN', 'AllowedDomains': allowedDomains, 'SessionLifetimeInMinutes': 100 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); Embedding with the QuickSight APIs 1537 Amazon QuickSight console.log(data); }); Example User Guide // The URL returned is over 900 characters. For this example, we've shortened the string for // readability and added ellipsis to indicate that it's incomplete. { Status: 200, EmbedUrl: 'https://quicksightdomain/embed/12345/dashboards/67890.., RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' } .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded console session. You can use this URL in your website or app to display the console. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; namespace GenerateDashboardEmbedUrlForRegisteredUser { class Program { static void Main(string[] args) { var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, SessionToken, Amazon.RegionEndpoint.USEast1); try { RegisteredUserQuickSightConsoleEmbeddingConfiguration registeredUserQuickSightConsoleEmbeddingConfiguration = new RegisteredUserQuickSightConsoleEmbeddingConfiguration { Embedding with the QuickSight APIs 1538 Amazon QuickSight User Guide InitialPath = "/start" }; RegisteredUserEmbeddingExperienceConfiguration registeredUserEmbeddingExperienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration { QuickSightConsole = registeredUserQuickSightConsoleEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new GenerateEmbedUrlForRegisteredUserRequest { AwsAccountId = "111122223333", ExperienceConfiguration = registeredUserEmbeddingExperienceConfiguration, UserArn = "REGISTERED_USER_ARN", AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 100 }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you're using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you're using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you're using SAML to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are Embedding with the QuickSight APIs 1539 Amazon QuickSight User Guide taking a just-in-time approach to add users when they first open QuickSight, the role also needs permissions enabled for quicksight:RegisterUser. aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --role-session-name [email protected] The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you're using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_console_session_role/[email protected]. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. The role session ID also becomes the user name in QuickSight. You can use this pattern to provision your users in QuickSight ahead of time, or to provision them the first time they access a console session. Embedding with the QuickSight APIs 1540 Amazon QuickSight User Guide The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API Reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM \ --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --user-role READER \ --user-name jhnd \ --session-name "[email protected]" \ --email [email protected] \ --region us-east-1 \ --custom-permissions-name TeamA1 If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set them up. Instead, they should be automatically subscribed the first time they access QuickSight. For Microsoft AD users, you can use DescribeUser to get the user ARN. The first time a user accesses QuickSight, you can also add this user to the appropriate group. The following example shows the CLI command to add a user to a group. aws quicksight create-group-membership \ --aws-account-id=111122223333 \ --namespace=default \ --group-name=financeusers \ --member-name="embedding_quicksight_dashboard_role/[email protected]" You now have a user of your app who is also a user of QuickSight, and who has access to the QuickSight console session. Finally, to get a signed URL for the console |
amazon-quicksight-user-421 | amazon-quicksight-user.pdf | 421 | Instead, they should be automatically subscribed the first time they access QuickSight. For Microsoft AD users, you can use DescribeUser to get the user ARN. The first time a user accesses QuickSight, you can also add this user to the appropriate group. The following example shows the CLI command to add a user to a group. aws quicksight create-group-membership \ --aws-account-id=111122223333 \ --namespace=default \ --group-name=financeusers \ --member-name="embedding_quicksight_dashboard_role/[email protected]" You now have a user of your app who is also a user of QuickSight, and who has access to the QuickSight console session. Finally, to get a signed URL for the console session, call generate-embed-url-for- registered-user from the app server. This returns the embeddable console session URL. The following example shows how to generate the URL for an embedded console session using a server-side call for users authenticated through AWS Managed Microsoft AD or single sign-on (IAM Identity Center). aws quicksight generate-embed-url-for-registered-user \ --aws-account-id 111122223333 \ Embedding with the QuickSight APIs 1541 Amazon QuickSight User Guide --entry-point the-url-for--the-console-session \ --session-lifetime-in-minutes 600 \ --user-arn arn:aws:quicksight:us-east-1:111122223333:user/default/ embedding_quicksight_dashboard_role/embeddingsession --allowed-domains '["domain1","domain2"]' \ --experience-configuration QuickSightConsole={InitialPath="/start"} For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can use this and other API operations in your own code. Step 3: Embed the console session URL In the following section, you can find out how you can use the Amazon QuickSight Embedding SDK (JavaScript) to embed the console session URL from step 3 in your website or application page. With the SDK, you can do the following: • Place the console session on an HTML page. • Pass parameters into the console session. • Handle error states with messages that are customized to your application. Call the GenerateEmbedUrlForRegisteredUser API operation to generate the URL that you can embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours. The API operation provides the URL with an auth_code that enables a single-sign on session. The following shows an example response from generate-embed-url-for-registered-user. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https://quicksightdomain/embedding/12345/start...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed this console session in your webpage by using the QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. Embedding with the QuickSight APIs 1542 Amazon QuickSight User Guide By using the Amazon QuickSight Embedding SDK, you can also control parameters within the console session and receive callbacks in terms of page load completion and errors. The domain that is going to host embedded dashboards must be on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded dashboards. For more information about adding domains for an embedded console, see Allow listing domains at runtime with the QuickSight API. The following example shows how to use the generated URL. This code is generated on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Console Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedSession = async() => { const { createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { Embedding with the QuickSight APIs 1543 Amazon QuickSight User Guide console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { onMessage: async (messageEvent, experienceMetadata) => { switch (messageEvent.eventName) { case 'ERROR_OCCURRED': { console.log("Do something when the embedded experience fails loading."); break; } } } }; const embeddedConsoleExperience = await embeddingContext.embedConsole(frameOptions, contentOptions); }; </script> </head> <body onload="embedSession()"> <div id="experience-container"></div> </body> </html> SDK 1.0 <!DOCTYPE html> <html> <head> <title>QuickSight Console Embedding</title> Embedding with the QuickSight APIs 1544 Amazon QuickSight User Guide <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var session function onError(payload) { console.log("Do something when the session fails loading"); } function embedSession() { var containerDiv = document.getElementById("embeddingContainer"); var options = { // replace this dummy url with the one generated via embedding API url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", // replace this dummy url with the one generated via embedding API container: containerDiv, parameters: { country: "United States" }, scrolling: "no", height: "700px", width: "1000px", locale: "en-US", footerPaddingEnabled: true, defaultEmbeddingVisualType: "TABLE", // this option only applies |
amazon-quicksight-user-422 | amazon-quicksight-user.pdf | 422 | SDK 1.0 <!DOCTYPE html> <html> <head> <title>QuickSight Console Embedding</title> Embedding with the QuickSight APIs 1544 Amazon QuickSight User Guide <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var session function onError(payload) { console.log("Do something when the session fails loading"); } function embedSession() { var containerDiv = document.getElementById("embeddingContainer"); var options = { // replace this dummy url with the one generated via embedding API url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", // replace this dummy url with the one generated via embedding API container: containerDiv, parameters: { country: "United States" }, scrolling: "no", height: "700px", width: "1000px", locale: "en-US", footerPaddingEnabled: true, defaultEmbeddingVisualType: "TABLE", // this option only applies to QuickSight console embedding and is not used for dashboard embedding }; session = QuickSightEmbedding.embedSession(options); session.on("error", onError); } function onCountryChange(obj) { session.setParameters({country: obj.value}); } </script> </head> <body onload="embedSession()"> <span> <label for="country">Country</label> <select id="country" name="country" onchange="onCountryChange(this)"> <option value="United States">United States</option> <option value="Mexico">Mexico</option> Embedding with the QuickSight APIs 1545 Amazon QuickSight User Guide <option value="Canada">Canada</option> </select> </span> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded console session on your website using JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight Embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Enabling Generative BI features in embedded consoles for registered users Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers You can enable the following Generative BI features in your embedded console: • Executive summaries: When enabled, registered Author Pro and Reader Pro users can generate executive summaries that provide a summary of all insights that QuickSight has generated for the dashboard to easily discover key insights. • Authoring: When enabled, Author Pro users can use Generative BI to build calculated fields and build and refine visuals. Embedding with the QuickSight APIs 1546 Amazon QuickSight User Guide • Q&A: When enabled, Author Pro and Reader Pro users can use the AI-powered Q&A to both suggest and answer questions related their data. • Data stories: When enabled, Author Pro and Reader Pro users can provide details to quickly generate a first draft of their data story. To enable Generative BI features in embedded consoles for registered users • Follow the steps in Embedding the full functionality of the Amazon QuickSight console for registered users to embed a console with the following changes: a. When generating the URL in Step 2, set Enabled: true in the FeatureConfigurations parameter for each of the features you want to enable in the GenerateEmbedUrlForRegisteredUser or GenerateEmbedUrlForRegisteredUserWithIdentity APIs, as shown in the following example. If no configuration is provided, the features are disabled by default. ExperienceConfiguration: { QuickSightConsole: { InitialPath: "initial_path", AmazonQInQuickSight: { FeatureConfigurations: { COMMENT: Enable executive summaries ExecutiveSummary: { Enabled: true }, COMMENT: Enable Generative BI authoring GenerativeAuthoring: { Enabled: true }, COMMENT: Enable Q&A DataQnA: { Enabled: true }, COMMENT: Enable data stories DataStories: { Enabled: true } } } } } Embedding with the QuickSight APIs 1547 Amazon QuickSight } User Guide b. When embedding the console URL with the QuickSight Embedding SDK in Step 3, set the values in the following example as desired. If no configuration is provided, the features are disabled by default. Note There is no SDK option for enabling data stories. If data stories are enabled with the API as shown in the previous step, they will be available to registered users. const contentOptions = { toolbarOptions: { executiveSummary: true, // Enable executive summaries buildVisual: true, // Enable Generative BI authoring dataQnA: true // Enable Q&A } }; Embedding the Amazon Q in QuickSight Generative Q&A experience Intended audience: Amazon QuickSight developers In the following sections, you can find detailed information about how to set up an embedded Generative Q&A experience that uses enhanced NLQ capabilties powered by LLMs. The Generative Q&A experience is the recommended replacement for the embedded Q Search Bar and provides an updated BI experience for users. Topics • Embedding the Amazon Q in QuickSight Generative Q&A experience for registered users • Embedding the Amazon Q in QuickSight Generative Q&A experience for anonymous (unregistered) users Embedding with the QuickSight APIs 1548 Amazon QuickSight User Guide Embedding the Amazon Q in QuickSight Generative Q&A experience for registered users In the following sections, you can find detailed information about how to set up an embedded Generative Q&A experience for registered users of QuickSight. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the Generative Q&A experience URL • Optional embedded Generative Q&A experience functionalities Step 1: Set up permissions In the following |
amazon-quicksight-user-423 | amazon-quicksight-user.pdf | 423 | the Amazon Q in QuickSight Generative Q&A experience for anonymous (unregistered) users Embedding with the QuickSight APIs 1548 Amazon QuickSight User Guide Embedding the Amazon Q in QuickSight Generative Q&A experience for registered users In the following sections, you can find detailed information about how to set up an embedded Generative Q&A experience for registered users of QuickSight. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the Generative Q&A experience URL • Optional embedded Generative Q&A experience functionalities Step 1: Set up permissions In the following section, you can find how to set up permissions for your backend application or web server to embed the Generative Q&A experience. This task requires administrative access to AWS Identity and Access Management (IAM). Each user who accesses a Generative Q&A experience assumes a role that gives them Amazon QuickSight access and permissions. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. The IAM role needs to provide permissions to retrieve embedding URLs for a specific user pool. With the help of the wildcard character *, you can grant the permissions to generate a URL for all users in a specific namespace. Or you can grant permissions to generate a URL for a subset of users in specific namespaces. For this, you add quicksight:GenerateEmbedUrlForRegisteredUser. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForRegisteredUser API operation. The AllowedDomains parameter is an optional parameter. It grants developers the option to override the static domains that are configured in the Manage QuickSight menu and instead list up to three domains or subdomains that can access a generated URL. This URL is then embedded in a developer's website. Only the domains that are listed in the parameter can access the embedded Generative Q&A experience. Without this condition, developers can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the Embedding with the QuickSight APIs 1549 Amazon QuickSight User Guide AllowedDomains parameter, see GenerateEmbedUrlForRegisteredUser in the Amazon QuickSight API Reference. The following sample policy provides these permissions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": "arn:partition:quicksight:region:accountId:user/namespace/userName", "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Also, if you're creating first-time users who will be Amazon QuickSight readers, make sure to add the quicksight:RegisterUser permission in the policy. The following sample policy provides permission to retrieve an embedding URL for first-time users who are to be QuickSight readers. { "Version": "2012-10-17", "Statement": [ { "Action": "quicksight:RegisterUser", "Resource": "*", "Effect": "Allow" }, { "Effect": "Allow", Embedding with the QuickSight APIs 1550 Amazon QuickSight "Action": [ User Guide "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": [ "arn:partition:quicksight:region:accountId:user/namespace/userName" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Finally, your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } Embedding with the QuickSight APIs 1551 Amazon QuickSight ] } User Guide For more information regarding trust policies for OpenID Connect or Security Assertion Markup Language (SAML) authentication, see the following sections of the IAM User Guide: • Creating a role for web identity or OpenID Connect federation (console) • Creating a role for SAML 2.0 federation (console) Step 2: Generate the URL with the authentication code attached In the following section, you can find how to authenticate your user and get the embeddable Q topic URL on your application server. If you plan to embed the Generative Q&A experience for IAM or Amazon QuickSight identity types, share the Q topic with the users. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then the app adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing the described steps ensures that each viewer of the Q topic is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. Tag-based row-level security can be used for anonymous |
amazon-quicksight-user-424 | amazon-quicksight-user.pdf | 424 | embed the Generative Q&A experience for IAM or Amazon QuickSight identity types, share the Q topic with the users. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then the app adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing the described steps ensures that each viewer of the Q topic is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. Tag-based row-level security can be used for anonymous user embedding of the Q bar. The following examples perform the IAM authentication on the user's behalf. This code runs on your app server. Java import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult; import com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration; Embedding with the QuickSight APIs 1552 Amazon QuickSight import User Guide com.amazonaws.services.quicksight.model.RegisteredUserGenerativeQnAEmbeddingConfiguration; /** * Class to call QuickSight AWS SDK to get url for embedding Generative Q&A experience. */ public class RegisteredUserGenerativeQnAEmbeddingSample { private final AmazonQuickSight quickSightClient; public RegisteredUserGenerativeQnAEmbeddingSample() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret- key"); } @Override public void refresh() { } } ) .build(); } public String getQuicksightEmbedUrl( final String accountId, // AWS Account ID final String topicId, // Topic ID to embed final List<String> allowedDomains, // Runtime allowed domain for embedding final String userArn // Registered user arn to use for embedding. Refer to Get Embed Url section in developer portal to find how to get user arn for a QuickSight user. ) throws Exception { final RegisteredUserEmbeddingExperienceConfiguration experienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration() .withGenerativeQnA(new RegisteredUserGenerativeQnAEmbeddingConfiguration().withInitialTopicId(topicId)); Embedding with the QuickSight APIs 1553 Amazon QuickSight User Guide final GenerateEmbedUrlForRegisteredUserRequest generateEmbedUrlForRegisteredUserRequest = new GenerateEmbedUrlForRegisteredUserRequest(); generateEmbedUrlForRegisteredUserRequest.setAwsAccountId(accountId); generateEmbedUrlForRegisteredUserRequest.setUserArn(userArn); generateEmbedUrlForRegisteredUserRequest.setAllowedDomains(allowedDomains); generateEmbedUrlForRegisteredUserRequest.setExperienceConfiguration(experienceConfiguration); final GenerateEmbedUrlForRegisteredUserResult generateEmbedUrlForRegisteredUserResult = quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest); return generateEmbedUrlForRegisteredUserResult.getEmbedUrl(); } } JavaScript Note Embed URL generation APIs cannot be called from browsers directly. Refer to the Node.JS example instead. Python3 import json import boto3 from botocore.exceptions import ClientError sts = boto3.client('sts') # Function to generate embedded URL # accountId: AWS account ID # topicId: Topic ID to embed # userArn: arn of registered user # allowedDomains: Runtime allowed domain for embedding # roleArn: IAM user role to use for embedding # sessionName: session name for the roleArn assume role def getEmbeddingURL(accountId, topicId, userArn, allowedDomains, roleArn, sessionName): try: Embedding with the QuickSight APIs 1554 Amazon QuickSight User Guide assumedRole = sts.assume_role( RoleArn = roleArn, RoleSessionName = sessionName, ) except ClientError as e: return "Error assuming role: " + str(e) else: assumedRoleSession = boto3.Session( aws_access_key_id = assumedRole['Credentials']['AccessKeyId'], aws_secret_access_key = assumedRole['Credentials']['SecretAccessKey'], aws_session_token = assumedRole['Credentials']['SessionToken'], ) try: quicksightClient = assumedRoleSession.client('quicksight', region_name='us- west-2') response = quicksightClient.generate_embed_url_for_registered_user( AwsAccountId=accountId, ExperienceConfiguration = { 'GenerativeQnA': { 'InitialTopicId': topicId } }, UserArn = userArn, AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: return "Error generating embedding url: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Embedding with the QuickSight APIs 1555 User Guide Amazon QuickSight Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ region: 'us-east-1' }); quicksightClient.generateEmbedUrlForRegisteredUser({ 'AwsAccountId': '111122223333', 'ExperienceConfiguration': { 'GenerativeQnA': { 'InitialTopicId': 'U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f' } }, 'UserArn': 'REGISTERED_USER_ARN', 'AllowedDomains': allowedDomains, 'SessionLifetimeInMinutes': 100 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded Q search bar. You can use this URL in your website or app to display the Q search bar. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; namespace GenerateGenerativeQnAEmbedUrlForRegisteredUser { class Program { static void Main(string[] args) Embedding with the QuickSight APIs 1556 Amazon QuickSight { User Guide var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, SessionToken, Amazon.RegionEndpoint.USEast1); try { RegisteredUserGenerativeQnAEmbeddingConfiguration registeredUserGenerativeQnAEmbeddingConfiguration = new RegisteredUserGenerativeQnAEmbeddingConfiguration { InitialTopicId = "U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f" }; RegisteredUserEmbeddingExperienceConfiguration registeredUserEmbeddingExperienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration { GenerativeQnA = registeredUserGenerativeQnAEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new GenerateEmbedUrlForRegisteredUserRequest { AwsAccountId = "111122223333", ExperienceConfiguration = registeredUserEmbeddingExperienceConfiguration, UserArn = "REGISTERED_USER_ARN", AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 100 }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } Embedding with the QuickSight APIs 1557 Amazon QuickSight AWS CLI User Guide To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to authenticate your user. • AssumeRoleWithSaml – |
amazon-quicksight-user-425 | amazon-quicksight-user.pdf | 425 | registeredUserGenerativeQnAEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new GenerateEmbedUrlForRegisteredUserRequest { AwsAccountId = "111122223333", ExperienceConfiguration = registeredUserEmbeddingExperienceConfiguration, UserArn = "REGISTERED_USER_ARN", AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 100 }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } Embedding with the QuickSight APIs 1557 Amazon QuickSight AWS CLI User Guide To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are taking a just-in-time approach to add users when they use a topic in the Q search bar, the role also needs permissions enabled for quicksight:RegisterUser. aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/ embedding_quicksight_q_generative_qna_role" \ --role-session-name [email protected] The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. For a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" Embedding with the QuickSight APIs 1558 Amazon QuickSight User Guide export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_q_search_bar_role/[email protected]. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. The role session ID also becomes the user name in QuickSight. You can use this pattern to provision your users in QuickSight ahead of time, or to provision them the first time that they access the Generative Q&A experience. The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM\ --iam-arn "arn:aws:iam::111122223333:role/ embedding_quicksight_q_generative_qna_role" \ --user-role READER \ --user-name jhnd \ --session-name "[email protected]" \ --email [email protected] \ --region us-east-1 \ --custom-permissions-name TeamA1 If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set them up. Instead, they should be automatically subscribed the first time that they access QuickSight. For Microsoft AD users, you can use DescribeUser to get the user Amazon Resource Name (ARN). The first time a user accesses QuickSight, you can also add this user to the group that the dashboard is shared with. The following example shows the CLI command to add a user to a group. aws quicksight create-group-membership \ Embedding with the QuickSight APIs 1559 Amazon QuickSight User Guide --aws-account-id 111122223333 \ --namespace default \ --group-name financeusers \ --member-name "embedding_quicksight_q_generative_qna_role/[email protected]" You now have a user of your app who is also a user of QuickSight, and who has access to the dashboard. Finally, to get a signed URL for the dashboard, call generate-embed-url-for-registered- user from the app server. This returns the embeddable dashboard URL. The following example shows how to generate the URL for an embedded dashboard using a server-side call for users authenticated through AWS Managed Microsoft AD or single sign-on (IAM Identity Center). aws quicksight generate-embed-url-for-anonymous-user \ --aws-account-id 111122223333 \ --namespace default-or-something-else \ --authorized-resource-arns '["topic-arn-topicId1","topic-arn-topicId2"]' \ --allowed-domains '["domain1","domain2"]' \ --experience-configuration 'GenerativeQnA={InitialTopicId="topicId1"}' \ --session-tags '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag-key-1,"Value": tag- value-1}]' \ --session-lifetime-in-minutes 15 For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can use this and other API operations in your own code. Step 3: Embed the Generative Q&A experience URL In the following section, you can find how to embed the Generative Q&A experience URL in your website or application page. You do this with the Amazon QuickSight embedding SDK (JavaScript). With the SDK, you can do the following: • Place the Generative Q&A experience on an HTML page. • Customize the layout and appearance of the embedded experience to fit your application needs. • Handle error states with messages that are customized to your application. To generate the URL that you can embed in your app, call the GenerateEmbedUrlForRegisteredUser API operation. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 |
amazon-quicksight-user-426 | amazon-quicksight-user.pdf | 426 | embed the Generative Q&A experience URL in your website or application page. You do this with the Amazon QuickSight embedding SDK (JavaScript). With the SDK, you can do the following: • Place the Generative Q&A experience on an HTML page. • Customize the layout and appearance of the embedded experience to fit your application needs. • Handle error states with messages that are customized to your application. To generate the URL that you can embed in your app, call the GenerateEmbedUrlForRegisteredUser API operation. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours. The API operation provides the URL with an auth_code value that enables a single-sign on session. Embedding with the QuickSight APIs 1560 Amazon QuickSight User Guide The following shows an example response from generate-embed-url-for-registered-user. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https://quicksightdomain/embedding/12345/q/search...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed the Generative Q&A experience in your webpage by using the QuickSight embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. Make sure that the domain to host the embedded Generative Q&A experience is on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded dashboards. For more information about adding domains for an embedded Generative Q&A experience, see Managing domains and embedding. You can use the QuickSight Embedding SDK to customize the layout and apperance of the embedded Generative Q&A experience to fit your application. Use the panelType property to configure the landing state of the Generative Q&A experience when it renders in your application. Set the panelType property to 'FULL' to render the full Generative Q&A experience panel. This panel resembles the experience that QuickSight users have in the QuickSight console. The frame height of the panel is not changed based on user interaction and respects the value that you set in the frameOptions.height property. The image below shows the Generative Q&A experience panel that renders when you set the panelType value to 'FULL'. Embedding with the QuickSight APIs 1561 Amazon QuickSight User Guide Set the panelType property to 'SEARCH_BAR' to render the Generative Q&A experience as a search bar. This search bar resembles the way that the Q Search Bar renders when it is embedded into an application. The Generative Q&A search bar expands to a larger panel that displays topic selection options, the question suggestion list, the answer panel or the pinboard. The default minimum height of the Generative Q&A search bar is rendered when the embedded asset loads. It is recommended that you set the frameOptions.height value to "38px" to optimize the search bar experience. Use the focusedHeight property to set the optimal size of the topic selection dropdown and the question suggestion list. Use the expandedHeight property to set the optimal size of the answer panel and pinboard. If you choose the 'SEARCH_BAR' option, it is recommended that you style the parent container with position; absolute to avoid unwanted content shifting in your application. The image below shows the Generative Q&A experience search bar that renders when you set the panelType value to 'SEARCH_BAR'. Embedding with the QuickSight APIs 1562 Amazon QuickSight User Guide After you configure the panelType property, use the QuickSight embedding SDK to customize the following properties of the Generative Q&A experience. • The title of the Generative Q&A panel (Applies only to the panelType: FULL option). • The search bar's placeholder text. • Whether topic selection is allowed. • Whether topic names are shown or hidden. • Whether the Amazon Q icon is shown or hidden (Applies only to the panelType: FULL option). • Whether the pinboard is shown of hidden. • Whether users can maximize the Genertaive Q&A panel to fullscreen. • The theme of the Generative Q&A panel. A custom theme ARN can be passed in the SDK to change the appearance of the frame's content. QuickSight starter themes are not supported for embedded Generative BI panels. To use a QuickSight starter theme, save it as a custom theme in QuickSight. When you use the QuickSight Embedding SDK, the Generative Q&A experience on your page is dynamically resized based on the state. By using the QuickSight Embedding SDK, you can also control parameters within the Generative Q&A experience and receive callbacks in terms of page load completion, state changes, and errors. The following example shows how to use the generated URL. |
amazon-quicksight-user-427 | amazon-quicksight-user.pdf | 427 | ARN can be passed in the SDK to change the appearance of the frame's content. QuickSight starter themes are not supported for embedded Generative BI panels. To use a QuickSight starter theme, save it as a custom theme in QuickSight. When you use the QuickSight Embedding SDK, the Generative Q&A experience on your page is dynamically resized based on the state. By using the QuickSight Embedding SDK, you can also control parameters within the Generative Q&A experience and receive callbacks in terms of page load completion, state changes, and errors. The following example shows how to use the generated URL. This code is generated on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Generative Q&A Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedGenerativeQnA = async() => { const {createEmbeddingContext} = QuickSightEmbedding; Embedding with the QuickSight APIs 1563 Amazon QuickSight User Guide const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { // Optional panel settings. Default behavior is equivalent to {panelType: 'FULL'} panelOptions: { panelType: 'FULL', title: 'custom title', // Optional showQIcon: false, // Optional, Default: true }, // Use SEARCH_BAR panel type for the landing state to be similar to embedQSearchBar // with generative capability enabled topics /* panelOptions: { panelType: 'SEARCH_BAR', Embedding with the QuickSight APIs 1564 Amazon QuickSight User Guide focusedHeight: '250px', expandedHeight: '500px', }, */ showTopicName: false, // Optional, Default: true showPinboard: false, // Optional, Default: true allowTopicSelection: false, // Optional, Default: true allowFullscreen: false, // Optional, Default: true searchPlaceholderText: "custom search placeholder", // Optional themeOptions: { // Optional themeArn: 'arn:aws:quicksight:<Region>:<AWS-Account-ID>:theme/ <Theme-ID>' } onMessage: async (messageEvent, experienceMetadata) => { switch (messageEvent.eventName) { case 'Q_SEARCH_OPENED': { // called when pinboard is shown / visuals are rendered console.log("Do something when SEARCH_BAR type panel is expanded"); break; } case 'Q_SEARCH_FOCUSED': { // called when question suggestions or topic selection dropdown are shown console.log("Do something when SEARCH_BAR type panel is focused"); break; } case 'Q_SEARCH_CLOSED': { // called when shrinked to initial bar height console.log("Do something when SEARCH_BAR type panel is collapsed"); break; } case 'Q_PANEL_ENTERED_FULLSCREEN': { console.log("Do something when panel enters full screen mode"); break; } case 'Q_PANEL_EXITED_FULLSCREEN': { console.log("Do something when panel exits full screen mode"); break; } Embedding with the QuickSight APIs 1565 Amazon QuickSight User Guide case 'CONTENT_LOADED': { console.log("Do something after experience is loaded"); break; } case 'ERROR_OCCURRED': { console.log("Do something when experience fails to load"); break; } } } }; const embeddedGenerativeQnExperience = await embeddingContext.embedGenerativeQnA(frameOptions, contentOptions); }; </script> </head> <body onload="embedGenerativeQnA()"> <div id="experience-container"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded Generative Q&A experience on your website with JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Embedding with the QuickSight APIs 1566 Amazon QuickSight User Guide Optional embedded Generative Q&A experience functionalities The following optional functionalities are available for the embedded Generative Q&A experience with the embedding SDK. Invoke Generative Q&A search bar actions • Set a question — This feature sends a question to the Generative Q&A experience and immediately queries the question. embeddedGenerativeQnExperience.setQuestion('show me monthly revenue'); • Close the answer panel (applies to the Generative Q&A search bar option) — This feature closes the answer panel and returns the iframe to the original search bar state. embeddedGenerativeQnExperience.close(); For more information, see the QuickSight embedding SDK. Embedding the Amazon Q in QuickSight Generative Q&A experience for anonymous (unregistered) users Intended audience: Amazon QuickSight developers In the following sections, you can find detailed information about how to set up an embedded Generative Q&A experience for anonymous (unregistered) users. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the Generative Q&A experience URL • Optional embedded Generative Q&A experience functionalities Embedding with the QuickSight APIs 1567 Amazon QuickSight Step 1: Set up permissions User Guide In the following section, you can find how to set up permissions for your backend application or web server to embed the Generative Q&A experience. This task requires administrative access to AWS Identity and Access Management (IAM). Each user who |
amazon-quicksight-user-428 | amazon-quicksight-user.pdf | 428 | set up an embedded Generative Q&A experience for anonymous (unregistered) users. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the Generative Q&A experience URL • Optional embedded Generative Q&A experience functionalities Embedding with the QuickSight APIs 1567 Amazon QuickSight Step 1: Set up permissions User Guide In the following section, you can find how to set up permissions for your backend application or web server to embed the Generative Q&A experience. This task requires administrative access to AWS Identity and Access Management (IAM). Each user who accesses a Generative Q&A experience assumes a role that gives them Amazon QuickSight access and permissions. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. The IAM role needs to provide permissions to retrieve embedding URLs for a specific user pool. With the help of the wildcard character *, you can grant the permissions to generate a URL for all users in a specific namespace. Or you can grant permissions to generate a URL for a subset of users in specific namespaces. For this, you add quicksight:GenerateEmbedUrlForAnonymousUser. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The AllowedDomains parameter is an optional parameter. It grants developers the option to override the static domains that are configured in the Manage QuickSight menu and instead list up to three domains or subdomains that can access a generated URL. This URL is then embedded in a developer's website. Only the domains that are listed in the parameter can access the embedded Q search bar. Without this condition, developers can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the AllowedDomains parameter, see GenerateEmbedUrlForAnonymousUser in the Amazon QuickSight API Reference. The following sample policy provides these permissions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForAnonymousUser" ], "Resource": [ Embedding with the QuickSight APIs 1568 Amazon QuickSight User Guide "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/ {{namespace}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-1}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-2}}" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } Your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf to load the Generative Q&A experience. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] Embedding with the QuickSight APIs 1569 Amazon QuickSight } User Guide For more information regarding trust policies, see Temporary security credentials in IAM in the IAM User Guide Step 2: Generate the URL with the authentication code attached In the following section, you can find how to authenticate your user and get the embeddable Q topic URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then the app adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Java import java.util.List; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.AnonymousUserGenerativeQnAEmbeddingConfiguration; import com.amazonaws.services.quicksight.model.AnonymousUserEmbeddingExperienceConfiguration; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserResult; import com.amazonaws.services.quicksight.model.SessionTag; /** * Class to call QuickSight AWS SDK to generate embed url for anonymous user. */ public class GenerateEmbedUrlForAnonymousUserExample { private final AmazonQuickSight quickSightClient; public GenerateEmbedUrlForAnonymousUserExample() { quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { Embedding with the QuickSight APIs 1570 Amazon QuickSight User Guide @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret-key"); } @Override public void refresh() { } } ) .build(); } public String GenerateEmbedUrlForAnonymousUser( final String accountId, // YOUR AWS ACCOUNT ID final String initialTopicId, // Q TOPIC ID TO WHICH THE CONSTRUCTED URL POINTS AND EXPERIENCE PREPOPULATES INITIALLY final String namespace, // ANONYMOUS EMBEDDING REQUIRES SPECIFYING A VALID NAMESPACE FOR WHICH YOU WANT THE EMBEDDING URL final List<String> authorizedResourceArns, // Q TOPIC ARN LIST TO EMBED final List<String> allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING final List<SessionTag> sessionTags // SESSION TAGS USED FOR ROW-LEVEL SECURITY ) throws Exception { AnonymousUserEmbeddingExperienceConfiguration experienceConfiguration = new AnonymousUserEmbeddingExperienceConfiguration(); AnonymousUserGenerativeQnAEmbeddingConfiguration generativeQnAConfiguration = new AnonymousUserGenerativeQnAEmbeddingConfiguration(); generativeQnAConfiguration.setInitialTopicId(initialTopicId); experienceConfiguration.setGenerativeQnA(generativeQnAConfiguration); GenerateEmbedUrlForAnonymousUserRequest generateEmbedUrlForAnonymousUserRequest = new GenerateEmbedUrlForAnonymousUserRequest() .withAwsAccountId(accountId) .withNamespace(namespace) .withAuthorizedResourceArns(authorizedResourceArns) .withExperienceConfiguration(experienceConfiguration) .withSessionTags(sessionTags) .withSessionLifetimeInMinutes(600L); // OPTIONAL: VALUE CAN BE [15-600]. DEFAULT: 600 .withAllowedDomains(allowedDomains); GenerateEmbedUrlForAnonymousUserResult result = quickSightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserRequest); |
amazon-quicksight-user-429 | amazon-quicksight-user.pdf | 429 | Q TOPIC ID TO WHICH THE CONSTRUCTED URL POINTS AND EXPERIENCE PREPOPULATES INITIALLY final String namespace, // ANONYMOUS EMBEDDING REQUIRES SPECIFYING A VALID NAMESPACE FOR WHICH YOU WANT THE EMBEDDING URL final List<String> authorizedResourceArns, // Q TOPIC ARN LIST TO EMBED final List<String> allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING final List<SessionTag> sessionTags // SESSION TAGS USED FOR ROW-LEVEL SECURITY ) throws Exception { AnonymousUserEmbeddingExperienceConfiguration experienceConfiguration = new AnonymousUserEmbeddingExperienceConfiguration(); AnonymousUserGenerativeQnAEmbeddingConfiguration generativeQnAConfiguration = new AnonymousUserGenerativeQnAEmbeddingConfiguration(); generativeQnAConfiguration.setInitialTopicId(initialTopicId); experienceConfiguration.setGenerativeQnA(generativeQnAConfiguration); GenerateEmbedUrlForAnonymousUserRequest generateEmbedUrlForAnonymousUserRequest = new GenerateEmbedUrlForAnonymousUserRequest() .withAwsAccountId(accountId) .withNamespace(namespace) .withAuthorizedResourceArns(authorizedResourceArns) .withExperienceConfiguration(experienceConfiguration) .withSessionTags(sessionTags) .withSessionLifetimeInMinutes(600L); // OPTIONAL: VALUE CAN BE [15-600]. DEFAULT: 600 .withAllowedDomains(allowedDomains); GenerateEmbedUrlForAnonymousUserResult result = quickSightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserRequest); Embedding with the QuickSight APIs 1571 Amazon QuickSight User Guide return result.getEmbedUrl(); } } JavaScript Note Embed URL generation APIs cannot be called from browsers directly. Refer to the Node.JS example instead. Python3 import json import boto3 from botocore.exceptions import ClientError import time # Create QuickSight and STS clients quicksightClient = boto3.client('quicksight',region_name='us-west-2') sts = boto3.client('sts') # Function to generate embedded URL for anonymous user # accountId: YOUR AWS ACCOUNT ID # topicId: Topic ID to embed # quicksightNamespace: VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING # authorizedResourceArns: TOPIC ARN LIST TO EMBED # allowedDomains: RUNTIME ALLOWED DOMAINS FOR EMBEDDING # sessionTags: SESSION TAGS USED FOR ROW-LEVEL SECURITY def generateEmbedUrlForAnonymousUser(accountId, quicksightNamespace, authorizedResourceArns, allowedDomains, sessionTags): try: response = quicksightClient.generate_embed_url_for_anonymous_user( AwsAccountId = accountId, Namespace = quicksightNamespace, AuthorizedResourceArns = authorizedResourceArns, AllowedDomains = allowedDomains, ExperienceConfiguration = { 'GenerativeQnA': { Embedding with the QuickSight APIs 1572 Amazon QuickSight User Guide 'InitialTopicId': topicId } }, SessionTags = sessionTags, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: print(e) return "Error generating embeddedURL: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ region: 'us-east-1', }); quicksightClient.generateEmbedUrlForAnonymousUser({ 'AwsAccountId': '111122223333', 'Namespace': 'DEFAULT' 'AuthorizedResourceArns': '["topic-arn-topicId1","topic-arn-topicId2"]', 'AllowedDomains': allowedDomains, 'ExperienceConfiguration': { 'GenerativeQnA': { 'InitialTopicId': 'U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f' } }, Embedding with the QuickSight APIs 1573 Amazon QuickSight User Guide 'SessionTags': '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag-key-1,"Value": tag-value-1}]', 'SessionLifetimeInMinutes': 15 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded Q search bar. You can use this URL in your website or app to display the Q search bar. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; namespace GenerateGenerativeQnAEmbedUrlForAnonymousUser { class Program { static void Main(string[] args) { var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, SessionToken, Amazon.RegionEndpoint.USEast1); try { AnonymousUserGenerativeQnAEmbeddingConfiguration anonymousUserGenerativeQnAEmbeddingConfiguration = new AnonymousUserGenerativeQnAEmbeddingConfiguration { InitialTopicId = "U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f" }; AnonymousUserEmbeddingExperienceConfiguration anonymousUserEmbeddingExperienceConfiguration Embedding with the QuickSight APIs 1574 Amazon QuickSight User Guide = new AnonymousUserEmbeddingExperienceConfiguration { GenerativeQnA = anonymousUserGenerativeQnAEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForAnonymousUserAsync(new GenerateEmbedUrlForAnonymousUserRequest { AwsAccountId = "111122223333", Namespace = "DEFAULT", AuthorizedResourceArns '["topic-arn-topicId1","topic-arn- topicId2"]', AllowedDomains = allowedDomains, ExperienceConfiguration = anonymousUserEmbeddingExperienceConfiguration, SessionTags = '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag-key-1,"Value": tag-value-1}]', SessionLifetimeInMinutes = 15, }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForAnonymousUser. Embedding with the QuickSight APIs 1575 Amazon QuickSight User Guide aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/ embedding_quicksight_generative_qna_role" \ --role-session-name anonymous caller The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. For a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_q_search_bar_role/QuickSightEmbeddingAnonymousPolicy. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing |
amazon-quicksight-user-430 | amazon-quicksight-user.pdf | 430 | set these three parameters in the CLI. For a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_q_search_bar_role/QuickSightEmbeddingAnonymousPolicy. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. In addition, it keeps each session separate and distinct. If you're using an array of web servers, for example for load balancing, and a session is reconnected to a different server, a new session begins. To get a signed URL for the dashboard, call generate-embed-url-for-anynymous-user from the app server. This returns the embeddable dashboard URL. The following example shows how Embedding with the QuickSight APIs 1576 Amazon QuickSight User Guide to generate the URL for an embedded dashboard using a server-side call for users who are making anonymous visits to your web portal or app. aws quicksight generate-embed-url-for-anonymous-user \ --aws-account-id 111122223333 \ --namespace default-or-something-else \ --authorized-resource-arns '["topic-arn-topicId","topic-arn-topicId2"]' \ --allowed-domains '["domain1","domain2"]' \ --experience-configuration 'GenerativeQnA={InitialTopicId="topicId1"}' \ --session-tags '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag-key-1,"Value": tag- value-1}]' \ --session-lifetime-in-minutes 15 For more information about using this operation, see GenerateEmbedUrlForAnonymousUser. You can use this and other API operations in your own code. Step 3: Embed the Generative Q&A experience URL In the following section, you can find how to embed the Generative Q&A experience URL in your website or application page. You do this with the Amazon QuickSight embedding SDK (JavaScript). With the SDK, you can do the following: • Place the Generative Q&A experience on an HTML page. • Customize the layout and appearance of the embedded experience to fit your application needs. • Handle error states with messages that are customized to your application. To generate the URL that you can embed in your app, call the GenerateEmbedUrlForAnonymousUser API operation. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours. The API operation provides the URL with an auth_code value that enables a single-sign on session. The following shows an example response from generate-embed-url-for-anonymous-user. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete.{ "Status": "200", "EmbedUrl": "https://quicksightdomain/embedding/12345/q/search...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" Embedding with the QuickSight APIs 1577 Amazon QuickSight } User Guide Embed the Generative Q&A experience in your webpage with the QuickSight embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. Make sure that the domain to host the Generative Q&A experience is on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded Generative Q&A experiences. For more information about adding domains for an embedded Generative Q&A experience, see Managing domains and embedding. You can use the QuickSight Embedding SDK to customize the layout and apperance of the embedded Generative Q&A experience to fit your application. Use the panelType property to configure the landing state of the Generative Q&A experience when it renders in your application. Set the panelType property to 'FULL' to render the full Generative Q&A experience panel. This panel resembles the experience that QuickSight users have in the QuickSight console. The frame height of the panel is not changed based on user interaction and respects the value that you set in the frameOptions.height property. The image below shows the Generative Q&A experience panel that renders when you set the panelType value to 'FULL'. Embedding with the QuickSight APIs 1578 Amazon QuickSight User Guide Set the panelType property to 'SEARCH_BAR' to render the Generative Q&A experience as a search bar. This search bar resembles the way that the Q Search Bar renders when it is embedded into an application. The Generative Q&A search bar expands to a larger panel that displays topic selection options, the question suggestion list, the answer panel or the pinboard. The default minimum height of the Generative Q&A search bar is rendered when the embedded asset loads. It is recommended that you set the frameOptions.height value to "38px" to optimize the search bar experience. Use the focusedHeight property to set the optimal size of the topic selection dropdown and the question suggestion list. Use the expandedHeight property to set the optimal size |
amazon-quicksight-user-431 | amazon-quicksight-user.pdf | 431 | that the Q Search Bar renders when it is embedded into an application. The Generative Q&A search bar expands to a larger panel that displays topic selection options, the question suggestion list, the answer panel or the pinboard. The default minimum height of the Generative Q&A search bar is rendered when the embedded asset loads. It is recommended that you set the frameOptions.height value to "38px" to optimize the search bar experience. Use the focusedHeight property to set the optimal size of the topic selection dropdown and the question suggestion list. Use the expandedHeight property to set the optimal size of the answer panel and pinboard. If you choose the 'SEARCH_BAR' option, it is recommended that you style the parent container with position; absolute to avoid unwanted content shifting in your application. The image below shows the Generative Q&A experience search bar that renders when you set the panelType value to 'SEARCH_BAR'. Embedding with the QuickSight APIs 1579 Amazon QuickSight User Guide After you configure the panelType property, use the QuickSight embedding SDK to customize the following properties of the Generative Q&A experience. • The title of the Generative Q&A panel (Applies only to the panelType: FULL option). • The search bar's placeholder text. • Whether topic selection is allowed. • Whether topic names are shown or hidden. • Whether the Amazon Q icon is shown or hidden (Applies only to the panelType: FULL option). • Whether the pinboard is shown of hidden. • Whether users can maximize the Genertaive Q&A panel to fullscreen. • The theme of the Generative Q&A panel. A custom theme ARN can be passed in the SDK to change the appearance of the frame's content. QuickSight starter themes are not supported for embedded Generative BI panels. To use a QuickSight starter theme, save it as a custom theme in QuickSight. When you use the QuickSight Embedding SDK, the Generative Q&A experience on your page is dynamically resized based on the state. With the QuickSight Embedding SDK, you can also control parameters within the Generative Q&A experience and receive callbacks in terms of page load completion, state changes, and errors. The following example shows how to use the generated URL. This code is generated on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Generative Q&A Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedGenerativeQnA = async() => { const {createEmbeddingContext} = QuickSightEmbedding; Embedding with the QuickSight APIs 1580 Amazon QuickSight User Guide const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { // Optional panel settings. Default behavior is equivalent to {panelType: 'FULL'} panelOptions: { panelType: 'FULL', title: 'custom title', // Optional showQIcon: false, // Optional, Default: true }, // Use SEARCH_BAR panel type for the landing state to be similar to embedQSearchBar // with generative capability enabled topics /* panelOptions: { panelType: 'SEARCH_BAR', Embedding with the QuickSight APIs 1581 Amazon QuickSight User Guide focusedHeight: '250px', expandedHeight: '500px', }, */ showTopicName: false, // Optional, Default: true showPinboard: false, // Optional, Default: true allowTopicSelection: false, // Optional, Default: true allowFullscreen: false, // Optional, Default: true searchPlaceholderText: "custom search placeholder", // Optional themeOptions: { // Optional themeArn: 'arn:aws:quicksight:<Region>:<AWS-Account-ID>:theme/ <Theme-ID>' } onMessage: async (messageEvent, experienceMetadata) => { switch (messageEvent.eventName) { case 'Q_SEARCH_OPENED': { // called when pinboard is shown / visuals are rendered console.log("Do something when SEARCH_BAR type panel is expanded"); break; } case 'Q_SEARCH_FOCUSED': { // called when question suggestions or topic selection dropdown are shown console.log("Do something when SEARCH_BAR type panel is focused"); break; } case 'Q_SEARCH_CLOSED': { // called when shrinked to initial bar height console.log("Do something when SEARCH_BAR type panel is collapsed"); break; } case 'Q_PANEL_ENTERED_FULLSCREEN': { console.log("Do something when panel enters full screen mode"); break; } case 'Q_PANEL_EXITED_FULLSCREEN': { console.log("Do something when panel exits full screen mode"); break; } Embedding with the QuickSight APIs 1582 Amazon QuickSight User Guide case 'CONTENT_LOADED': { console.log("Do something after experience is loaded"); break; } case 'ERROR_OCCURRED': { console.log("Do something when experience fails to load"); break; } } } }; const embeddedGenerativeQnExperience = await embeddingContext.embedGenerativeQnA(frameOptions, contentOptions); }; </script> </head> <body onload="embedGenerativeQnA()"> <div id="experience-container"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded Generative Q&A experience on your website with JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a group |
amazon-quicksight-user-432 | amazon-quicksight-user.pdf | 432 | the QuickSight APIs 1582 Amazon QuickSight User Guide case 'CONTENT_LOADED': { console.log("Do something after experience is loaded"); break; } case 'ERROR_OCCURRED': { console.log("Do something when experience fails to load"); break; } } } }; const embeddedGenerativeQnExperience = await embeddingContext.embedGenerativeQnA(frameOptions, contentOptions); }; </script> </head> <body onload="embedGenerativeQnA()"> <div id="experience-container"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded Generative Q&A experience on your website with JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Embedding with the QuickSight APIs 1583 Amazon QuickSight User Guide Optional embedded Generative Q&A experience functionalities The following optional functionalities are available for the embedded Generative Q&A experience with the embedding SDK. Invoke Generative Q&A search bar actions • Set a question — This feature sends a question to the Generative Q&A experience and immediately queries the question. embeddedGenerativeQnExperience.setQuestion('show me monthly revenue'); • Close the answer panel (applies to the Generative Q&A search bar option) — This feature closes the answer panel and returns the iframe to the original search bar state. embeddedGenerativeQnExperience.close(); For more information, see the QuickSight embedding SDK. Embedding the Amazon QuickSight Q search bar (Classic) Intended audience: Amazon QuickSight developers Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. Use the following topics to learn about embedding the Q search bar with the QuickSight APIs. Topics • Embedding the Amazon QuickSight Q search bar for registered users • Embedding the Amazon QuickSight Q search bar for anonymous (unregistered) users Embedding with the QuickSight APIs 1584 Amazon QuickSight User Guide Embedding the Amazon QuickSight Q search bar for registered users Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. In the following sections, you can find detailed information about how to set up an embedded Amazon QuickSight Q search bar for registered users of QuickSight. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the Q search bar URL • Optional Amazon QuickSight Q search bar embedding functionalities Step 1: Set up permissions Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. Embedding with the QuickSight APIs 1585 Amazon QuickSight User Guide In the following section, you can find how to set up permissions for your backend application or web server to embed the Q search bar. This task requires administrative access to AWS Identity and Access Management (IAM). Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access and permissions to the dashboard. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. The IAM role needs to provide permissions to retrieve embedding URLs for a specific user pool. With the help of the wildcard character *, you can grant the permissions to generate a URL for all users in a specific namespace. Or you can grant permissions to generate a URL for a subset of users in specific namespaces. For this, you add quicksight:GenerateEmbedUrlForRegisteredUser. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForRegisteredUser API operation. The AllowedDomains parameter is an optional parameter. It grants developers the option to override the static domains that are configured in the Manage QuickSight menu and instead list up to three domains or subdomains that can access a generated URL. This URL is then embedded in a developer's website. Only the domains that are listed in the parameter can access the embedded Q search bar. Without this condition, developers |
amazon-quicksight-user-433 | amazon-quicksight-user.pdf | 433 | For this, you add quicksight:GenerateEmbedUrlForRegisteredUser. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForRegisteredUser API operation. The AllowedDomains parameter is an optional parameter. It grants developers the option to override the static domains that are configured in the Manage QuickSight menu and instead list up to three domains or subdomains that can access a generated URL. This URL is then embedded in a developer's website. Only the domains that are listed in the parameter can access the embedded Q search bar. Without this condition, developers can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the AllowedDomains parameter, see GenerateEmbedUrlForRegisteredUser in the Amazon QuickSight API Reference. The following sample policy provides these permissions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": "arn:partition:quicksight:region:accountId:user/namespace/userName", "Condition": { Embedding with the QuickSight APIs 1586 Amazon QuickSight User Guide "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] } Also, if you're creating first-time users who will be Amazon QuickSight readers, make sure to add the quicksight:RegisterUser permission in the policy. The following sample policy provides permission to retrieve an embedding URL for first-time users who are to be QuickSight readers. { "Version": "2012-10-17", "Statement": [ { "Action": "quicksight:RegisterUser", "Resource": "*", "Effect": "Allow" }, { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForRegisteredUser" ], "Resource": [ "arn:partition:quicksight:region:accountId:user/namespace/userName" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } ] Embedding with the QuickSight APIs 1587 Amazon QuickSight } User Guide Finally, your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } For more information regarding trust policies for OpenID Connect or Security Assertion Markup Language (SAML) authentication, see the following sections of the IAM User Guide: • Creating a role for web identity or OpenID Connect federation (console) • Creating a role for SAML 2.0 federation (console) Embedding with the QuickSight APIs 1588 Amazon QuickSight User Guide Step 2: Generate the URL with the authentication code attached Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. In the following section, you can find how to authenticate your user and get the embeddable Q topic URL on your application server. If you plan to embed the Q bar for IAM or Amazon QuickSight identity types, share the Q topic with the users. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then the app adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing the described steps ensures that each viewer of the Q topic is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. The following examples perform the IAM authentication on the user's behalf. This code runs on your app server. Java import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForRegisteredUserResult; import com.amazonaws.services.quicksight.model.RegisteredUserEmbeddingExperienceConfiguration; import com.amazonaws.services.quicksight.model.RegisteredUserQSearchBarEmbeddingConfiguration; Embedding with the QuickSight APIs 1589 Amazon QuickSight User Guide /** * Class to call QuickSight AWS SDK to get url for embedding the Q search bar. */ public class RegisteredUserQSearchBarEmbeddingConfiguration { private final AmazonQuickSight quickSightClient; public RegisteredUserQSearchBarEmbeddingConfiguration() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret- key"); } @Override public void refresh() { } } ) .build(); } public String getQuicksightEmbedUrl( final String accountId, // AWS Account ID final String topicId, // Topic ID to embed final List<String> allowedDomains, // Runtime allowed domain for embedding final String userArn // Registered user arn to use for embedding. Refer to Get Embed Url section in developer portal to find how to get user arn for a QuickSight user. ) throws Exception { final RegisteredUserEmbeddingExperienceConfiguration experienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration() .withQSearchBar(new RegisteredUserQSearchBarEmbeddingConfiguration().withInitialTopicId(topicId)); final GenerateEmbedUrlForRegisteredUserRequest generateEmbedUrlForRegisteredUserRequest = new |
amazon-quicksight-user-434 | amazon-quicksight-user.pdf | 434 | provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret- key"); } @Override public void refresh() { } } ) .build(); } public String getQuicksightEmbedUrl( final String accountId, // AWS Account ID final String topicId, // Topic ID to embed final List<String> allowedDomains, // Runtime allowed domain for embedding final String userArn // Registered user arn to use for embedding. Refer to Get Embed Url section in developer portal to find how to get user arn for a QuickSight user. ) throws Exception { final RegisteredUserEmbeddingExperienceConfiguration experienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration() .withQSearchBar(new RegisteredUserQSearchBarEmbeddingConfiguration().withInitialTopicId(topicId)); final GenerateEmbedUrlForRegisteredUserRequest generateEmbedUrlForRegisteredUserRequest = new GenerateEmbedUrlForRegisteredUserRequest(); generateEmbedUrlForRegisteredUserRequest.setAwsAccountId(accountId); Embedding with the QuickSight APIs 1590 Amazon QuickSight User Guide generateEmbedUrlForRegisteredUserRequest.setUserArn(userArn); generateEmbedUrlForRegisteredUserRequest.setAllowedDomains(allowedDomains); generateEmbedUrlForRegisteredUserRequest.setExperienceConfiguration(QSearchBar); final GenerateEmbedUrlForRegisteredUserResult generateEmbedUrlForRegisteredUserResult = quickSightClient.generateEmbedUrlForRegisteredUser(generateEmbedUrlForRegisteredUserRequest); return generateEmbedUrlForRegisteredUserResult.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function generateEmbedUrlForRegisteredUser( accountId, topicId, // Topic ID to embed openIdToken, // Cognito-based token userArn, // registered user arn roleArn, // IAM user role to use for embedding sessionName, // Session name for the roleArn assume role allowedDomains, // Runtime allowed domain for embedding getEmbedUrlCallback, // GetEmbedUrl success callback method errorCallback // GetEmbedUrl error callback method ) { const stsClient = new AWS.STS(); let stsParams = { RoleSessionName: sessionName, WebIdentityToken: openIdToken, RoleArn: roleArn } stsClient.assumeRoleWithWebIdentity(stsParams, function(err, data) { if (err) { console.log('Error assuming role'); console.log(err, err.stack); errorCallback(err); } else { const getQSearchBarParams = { Embedding with the QuickSight APIs 1591 Amazon QuickSight User Guide "AwsAccountId": accountId, "ExperienceConfiguration": { "QSearchBar": { "InitialTopicId": topicId } }, "UserArn": userArn, "AllowedDomains": allowedDomains, "SessionLifetimeInMinutes": 600 }; const quicksightGetQSearchBar = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: data.Credentials.AccessKeyId, secretAccessKey: data.Credentials.SecretAccessKey, sessionToken: data.Credentials.SessionToken, expiration: data.Credentials.Expiration } }); quicksightGetQSearchBar.generateEmbedUrlForRegisteredUser(getQSearchBarParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // Use your website domain to secure access to GetEmbedUrl API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } getEmbedUrlCallback(result); } }); } }); Embedding with the QuickSight APIs 1592 User Guide Amazon QuickSight } Python3 import json import boto3 from botocore.exceptions import ClientError sts = boto3.client('sts') # Function to generate embedded URL # accountId: AWS account ID # topicId: Topic ID to embed # userArn: arn of registered user # allowedDomains: Runtime allowed domain for embedding # roleArn: IAM user role to use for embedding # sessionName: session name for the roleArn assume role def getEmbeddingURL(accountId, topicId, userArn, allowedDomains, roleArn, sessionName): try: assumedRole = sts.assume_role( RoleArn = roleArn, RoleSessionName = sessionName, ) except ClientError as e: return "Error assuming role: " + str(e) else: assumedRoleSession = boto3.Session( aws_access_key_id = assumedRole['Credentials']['AccessKeyId'], aws_secret_access_key = assumedRole['Credentials']['SecretAccessKey'], aws_session_token = assumedRole['Credentials']['SessionToken'], ) try: quicksightClient = assumedRoleSession.client('quicksight', region_name='us- west-2') response = quicksightClient.generate_embed_url_for_registered_user( AwsAccountId=accountId, ExperienceConfiguration = { "QSearchBar": { "InitialTopicId": topicId } }, UserArn = userArn, AllowedDomains = allowedDomains, Embedding with the QuickSight APIs 1593 Amazon QuickSight User Guide SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: return "Error generating embedding url: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksightClient.generateEmbedUrlForRegisteredUser({ 'AwsAccountId': '111122223333', 'ExperienceConfiguration': { 'QSearchBar': { 'InitialTopicId': 'U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f' } }, 'UserArn': 'REGISTERED_USER_ARN', 'AllowedDomains': allowedDomains, 'SessionLifetimeInMinutes': 100 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); Embedding with the QuickSight APIs 1594 Amazon QuickSight console.log(data); }); Example User Guide //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { Status: 200, EmbedUrl: "https://quicksightdomain/embed/12345/dashboards/67890/sheets/12345/ visuals/67890...", RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' } .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded Q search bar. You can use this URL in your website or app to display the Q search bar. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; namespace GenerateDashboardEmbedUrlForRegisteredUser { class Program { static void Main(string[] args) { var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, SessionToken, Amazon.RegionEndpoint.USEast1); try { RegisteredUserQSearchBarEmbeddingConfiguration registeredUserQSearchBarEmbeddingConfiguration = new RegisteredUserQSearchBarEmbeddingConfiguration Embedding with the QuickSight APIs 1595 Amazon QuickSight { User Guide InitialTopicId = "U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f" }; RegisteredUserEmbeddingExperienceConfiguration registeredUserEmbeddingExperienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration { QSearchBar = registeredUserQSearchBarEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new GenerateEmbedUrlForRegisteredUserRequest { AwsAccountId = "111122223333", ExperienceConfiguration = registeredUserEmbeddingExperienceConfiguration, UserArn = "REGISTERED_USER_ARN", AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 100 }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this |
amazon-quicksight-user-435 | amazon-quicksight-user.pdf | 435 | = new RegisteredUserQSearchBarEmbeddingConfiguration Embedding with the QuickSight APIs 1595 Amazon QuickSight { User Guide InitialTopicId = "U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f" }; RegisteredUserEmbeddingExperienceConfiguration registeredUserEmbeddingExperienceConfiguration = new RegisteredUserEmbeddingExperienceConfiguration { QSearchBar = registeredUserQSearchBarEmbeddingConfiguration }; Console.WriteLine( quicksightClient.GenerateEmbedUrlForRegisteredUserAsync(new GenerateEmbedUrlForRegisteredUserRequest { AwsAccountId = "111122223333", ExperienceConfiguration = registeredUserEmbeddingExperienceConfiguration, UserArn = "REGISTERED_USER_ARN", AllowedDomains = allowedDomains, SessionLifetimeInMinutes = 100 }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForRegisteredUser. If you are Embedding with the QuickSight APIs 1596 Amazon QuickSight User Guide taking a just-in-time approach to add users when they use a topic in the Q search bar, the role also needs permissions enabled for quicksight:RegisterUser. aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/embedding_quicksight_q_search_bar_role" \ --role-session-name [email protected] The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. For a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_q_search_bar_role/[email protected]. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. The role session ID also becomes the user name in QuickSight. You can use this pattern to provision your users in QuickSight ahead of time, or to provision them the first time that they access the Q search bar. Embedding with the QuickSight APIs 1597 Amazon QuickSight User Guide The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM \ --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_q_search_bar_role" \ --user-role READER \ --user-name jhnd \ --session-name "[email protected]" \ --email [email protected] \ --region us-east-1 \ --custom-permissions-name TeamA1 If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set them up. Instead, they should be automatically subscribed the first time that they access QuickSight. For Microsoft AD users, you can use DescribeUser to get the user Amazon Resource Name (ARN). The first time a user accesses QuickSight, you can also add this user to the group that the dashboard is shared with. The following example shows the CLI command to add a user to a group. aws quicksight create-group-membership \ --aws-account-id=111122223333 \ --namespace=default \ --group-name=financeusers \ --member-name="embedding_quicksight_q_search_bar_role/[email protected]" You now have a user of your app who is also a user of QuickSight, and who has access to the dashboard. Finally, to get a signed URL for the dashboard, call generate-embed-url-for-registered- user from the app server. This returns the embeddable dashboard URL. The following example shows how to generate the URL for an embedded dashboard using a server-side call for users authenticated through AWS Managed Microsoft AD or single sign-on (IAM Identity Center). aws quicksight generate-embed-url-for-registered-user \ --aws-account-id 111122223333 \ --session-lifetime-in-minutes 600 \ Embedding with the QuickSight APIs 1598 Amazon QuickSight User Guide --user-arn arn:aws:quicksight:us-east-1:111122223333:user/default/ embedding_quicksight_q_search_bar_role/embeddingsession --allowed-domains '["domain1","domain2"]' \ --experience-configuration QSearchBar={InitialTopicId=U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f} For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can use this and other API operations in your own code. Step 3: Embed the Q search bar URL Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. In the following section, you can find how to embed the Q search bar URL from step 3 in your website or application page. You do this with the Amazon QuickSight embedding SDK (JavaScript). With the SDK, you can do the following: • Place |
amazon-quicksight-user-436 | amazon-quicksight-user.pdf | 436 | URL Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. In the following section, you can find how to embed the Q search bar URL from step 3 in your website or application page. You do this with the Amazon QuickSight embedding SDK (JavaScript). With the SDK, you can do the following: • Place the Q search bar on an HTML page. • Pass parameters into the Q search bar. • Handle error states with messages that are customized to your application. To generate the URL that you can embed in your app, call the GenerateEmbedUrlForRegisteredUser API operation. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours. The API operation provides the URL with an auth_code value that enables a single-sign on session. The following shows an example response from generate-embed-url-for-registered-user. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", Embedding with the QuickSight APIs 1599 Amazon QuickSight User Guide "EmbedUrl": "https://quicksightdomain/embedding/12345/q/search...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed the Q search bar in your webpage by using the QuickSight embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. To do this, make sure that the domain to host the embedded Q search bar is on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded dashboards. For more information about adding domains for an embedded Q search bar, see Managing domains and embedding. When you use the QuickSight Embedding SDK, the Q search bar on your page is dynamically resized based on the state. By using the QuickSight Embedding SDK, you can also control parameters within the Q search bar and receive callbacks in terms of page load completion and errors. The following example shows how to use the generated URL. This code is generated on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Q Search Bar Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedQSearchBar = async() => { const { createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { console.log('Context received a change', changeEvent, metadata); }, Embedding with the QuickSight APIs 1600 Amazon QuickSight }); User Guide const frameOptions = { url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { hideTopicName: false, theme: '<YOUR_THEME_ID>', allowTopicSelection: true, onMessage: async (messageEvent, experienceMetadata) => { switch (messageEvent.eventName) { case 'Q_SEARCH_OPENED': { console.log("Do something when Q Search content expanded"); break; } case 'Q_SEARCH_CLOSED': { console.log("Do something when Q Search content collapsed"); break; } case 'Q_SEARCH_SIZE_CHANGED': { console.log("Do something when Q Search size changed"); break; } Embedding with the QuickSight APIs 1601 Amazon QuickSight User Guide case 'CONTENT_LOADED': { console.log("Do something when the Q Search is loaded."); break; } case 'ERROR_OCCURRED': { console.log("Do something when the Q Search fails loading."); break; } } } }; const embeddedDashboardExperience = await embeddingContext.embedQSearchBar(frameOptions, contentOptions); }; </script> </head> <body onload="embedQSearchBar()"> <div id="experience-container"></div> </body> </html> SDK 1.0 <!DOCTYPE html> <html> <head> <title>QuickSight Q Search Bar Embedding</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var session function onError(payload) { console.log("Do something when the session fails loading"); } function onOpen() { console.log("Do something when the Q search bar opens"); Embedding with the QuickSight APIs 1602 Amazon QuickSight } User Guide function onClose() { console.log("Do something when the Q search bar closes"); } function embedQSearchBar() { var containerDiv = document.getElementById("embeddingContainer"); var options = { url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", // replace this dummy url with the one generated via embedding API container: containerDiv, width: "1000px", locale: "en-US", qSearchBarOptions: { expandCallback: onOpen, collapseCallback: onClose, iconDisabled: false, topicNameDisabled: false, themeId: 'bdb844d0-0fe9-4d9d-b520-0fe602d93639', allowTopicSelection: true } }; session = QuickSightEmbedding.embedQSearchBar(options); session.on("error", onError); } function onCountryChange(obj) { session.setParameters({country: obj.value}); } </script> </head> <body onload="embedQSearchBar()"> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded dashboard on your website using JavaScript. |
amazon-quicksight-user-437 | amazon-quicksight-user.pdf | 437 | something when the Q search bar closes"); } function embedQSearchBar() { var containerDiv = document.getElementById("embeddingContainer"); var options = { url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", // replace this dummy url with the one generated via embedding API container: containerDiv, width: "1000px", locale: "en-US", qSearchBarOptions: { expandCallback: onOpen, collapseCallback: onClose, iconDisabled: false, topicNameDisabled: false, themeId: 'bdb844d0-0fe9-4d9d-b520-0fe602d93639', allowTopicSelection: true } }; session = QuickSightEmbedding.embedQSearchBar(options); session.on("error", onError); } function onCountryChange(obj) { session.setParameters({country: obj.value}); } </script> </head> <body onload="embedQSearchBar()"> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded dashboard on your website using JavaScript. To get your copy, do one of the following: Embedding with the QuickSight APIs 1603 Amazon QuickSight User Guide • Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Optional Amazon QuickSight Q search bar embedding functionalities Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. The following optional functionalities are available for the embedded Q search bar using the embedding SDK. Invoke Q search bar actions The following options are only supported for Q search bar embedding. • Set a Q search bar question — This feature sends a question to the Q search bar and immediately queries the question. It also automatically opens the Q popover. qBar.setQBarQuestion('show me monthly revenue'); • Close the Q popover — This feature closes the Q popover and returns the iframe to the original Q search bar size. qBar.closeQPopover(); Embedding with the QuickSight APIs 1604 Amazon QuickSight User Guide For more information, see the QuickSight embedding SDK. Embedding the Amazon QuickSight Q search bar for anonymous (unregistered) users Intended audience: Amazon QuickSight developers Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. In the following sections, you can find detailed information about how to set up an embedded Amazon QuickSight Q search bar for anonymous (unregistered) users. Topics • Step 1: Set up permissions • Step 2: Generate the URL with the authentication code attached • Step 3: Embed the Q search bar URL • Optional Amazon QuickSight Q search bar embedding functionalities Step 1: Set up permissions Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. Embedding with the QuickSight APIs 1605 Amazon QuickSight User Guide In the following section, you can find how to set up permissions for your backend application or web server to embed the Q search bar. This task requires administrative access to AWS Identity and Access Management (IAM). Each user who accesses a Q search bar assumes a role that gives them Amazon QuickSight access and permissions to the Q search bar. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. The IAM role needs to provide permissions to retrieve embedding URLs for a specific user pool. With the help of the wildcard character *, you can grant the permissions to generate a URL for all users in a specific namespace. Or you can grant permissions to generate a URL for a subset of users in specific namespaces. For this, you add quicksight:GenerateEmbedUrlForAnonymousUser. You can create a condition in your IAM policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The AllowedDomains parameter is an optional parameter. It grants developers the option to override the static domains that are configured in the Manage QuickSight menu and instead list up to three domains or subdomains that can access a generated URL. This URL is then embedded in a developer's website. Only the domains that are listed in the parameter can access the embedded Q search bar. Without this condition, developers can list any domain on the internet in the AllowedDomains parameter. To limit |
amazon-quicksight-user-438 | amazon-quicksight-user.pdf | 438 | policy that limits the domains that developers can list in the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser API operation. The AllowedDomains parameter is an optional parameter. It grants developers the option to override the static domains that are configured in the Manage QuickSight menu and instead list up to three domains or subdomains that can access a generated URL. This URL is then embedded in a developer's website. Only the domains that are listed in the parameter can access the embedded Q search bar. Without this condition, developers can list any domain on the internet in the AllowedDomains parameter. To limit the domains that developers can use with this parameter, add an AllowedEmbeddingDomains condition to your IAM policy. For more information about the AllowedDomains parameter, see GenerateEmbedUrlForAnonymousUser in the Amazon QuickSight API Reference. The following sample policy provides these permissions. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GenerateEmbedUrlForAnonymousUser" ], "Resource": [ "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:namespace/ {{namespace}}", Embedding with the QuickSight APIs 1606 Amazon QuickSight User Guide "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-1}}", "arn:{{partition}}:quicksight:{{region}}:{{accountId}}:dashboard/ {{dashboardId-2}}" ], "Condition": { "ForAllValues:StringEquals": { "quicksight:AllowedEmbeddingDomains": [ "https://my.static.domain1.com", "https://*.my.static.domain2.com" ] } } } Your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf to open the Q search bar. The following example shows a sample trust policy. { "Version": "2012-10-17", "Statement": [ { "Sid": "AllowLambdaFunctionsToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "lambda.amazonaws.com" }, "Action": "sts:AssumeRole" }, { "Sid": "AllowEC2InstancesToAssumeThisRole", "Effect": "Allow", "Principal": { "Service": "ec2.amazonaws.com" }, "Action": "sts:AssumeRole" } ] } Embedding with the QuickSight APIs 1607 Amazon QuickSight User Guide For more information regarding trust policies, see Temporary security credentials in IAM in the IAM User Guide Step 2: Generate the URL with the authentication code attached Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. In the following section, you can find how to authenticate your user and get the embeddable Q topic URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then the app adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. For more information, see AnonymousUserQSearchBarEmbeddingConfiguration. Java import java.util.List; import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.AnonymousUserQSearchBarEmbeddingConfiguration; import com.amazonaws.services.quicksight.model.AnonymousUserEmbeddingExperienceConfiguration; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserRequest; import com.amazonaws.services.quicksight.model.GenerateEmbedUrlForAnonymousUserResult; import com.amazonaws.services.quicksight.model.SessionTag; Embedding with the QuickSight APIs 1608 Amazon QuickSight User Guide /** * Class to call QuickSight AWS SDK to generate embed url for anonymous user. */ public class GenerateEmbedUrlForAnonymousUserExample { private final AmazonQuickSight quickSightClient; public GenerateEmbedUrlForAnonymousUserExample() { quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access-key", "secret- key"); } @Override public void refresh() { } } ) .build(); } public String GenerateEmbedUrlForAnonymousUser( final String accountId, // YOUR AWS ACCOUNT ID final String initialTopicId, // Q TOPIC ID TO WHICH THE CONSTRUCTED URL POINTS AND SEARCHBAR PREPOPULATES INITIALLY final String namespace, // ANONYMOUS EMBEDDING REQUIRES SPECIFYING A VALID NAMESPACE FOR WHICH YOU WANT THE EMBEDDING URL final List<String> authorizedResourceArns, // Q SEARCHBAR TOPIC ARN LIST TO EMBED final List<String> allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING final List<SessionTag> sessionTags // SESSION TAGS USED FOR ROW-LEVEL SECURITY ) throws Exception { AnonymousUserEmbeddingExperienceConfiguration experienceConfiguration = new AnonymousUserEmbeddingExperienceConfiguration(); Embedding with the QuickSight APIs 1609 Amazon QuickSight User Guide AnonymousUserQSearchBarEmbeddingConfiguration qSearchBarConfiguration = new AnonymousUserQSearchBarEmbeddingConfiguration(); qSearchBarConfiguration.setInitialTopicId(initialTopicId); experienceConfiguration.setQSearchBar(qSearchBarConfiguration); GenerateEmbedUrlForAnonymousUserRequest generateEmbedUrlForAnonymousUserRequest = new GenerateEmbedUrlForAnonymousUserRequest() .withAwsAccountId(accountId) .withNamespace(namespace) .withAuthorizedResourceArns(authorizedResourceArns) .withExperienceConfiguration(experienceConfiguration) .withSessionTags(sessionTags) .withSessionLifetimeInMinutes(600L); // OPTIONAL: VALUE CAN BE [15-600]. DEFAULT: 600 .withAllowedDomains(allowedDomains); GenerateEmbedUrlForAnonymousUserResult qSearchBarEmbedUrl = quickSightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserRequest); return qSearchBarEmbedUrl.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function generateEmbedUrlForAnonymousUser( accountId, // YOUR AWS ACCOUNT ID initialTopicId, // Q TOPIC ID TO WHICH THE CONSTRUCTED URL POINTS quicksightNamespace, // VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING authorizedResourceArns, // Q SEARCHBAR TOPIC ARN LIST TO EMBED allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING sessionTags, // SESSION TAGS USED FOR ROW-LEVEL SECURITY generateEmbedUrlForAnonymousUserCallback, // SUCCESS CALLBACK METHOD errorCallback // ERROR CALLBACK METHOD ) { const experienceConfiguration = { "QSearchBar": { Embedding with the QuickSight APIs 1610 Amazon QuickSight User Guide "InitialTopicId": initialTopicId // TOPIC ID CAN BE FOUND IN THE URL ON THE TOPIC AUTHOR PAGE } }; const generateEmbedUrlForAnonymousUserParams = { "AwsAccountId": accountId, "Namespace": quicksightNamespace, "AuthorizedResourceArns": authorizedResourceArns, "AllowedDomains": allowedDomains, "ExperienceConfiguration": experienceConfiguration, "SessionTags": sessionTags, "SessionLifetimeInMinutes": 600 }; const quicksightClient = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: AccessKeyId, |
amazon-quicksight-user-439 | amazon-quicksight-user.pdf | 439 | authorizedResourceArns, // Q SEARCHBAR TOPIC ARN LIST TO EMBED allowedDomains, // RUNTIME ALLOWED DOMAINS FOR EMBEDDING sessionTags, // SESSION TAGS USED FOR ROW-LEVEL SECURITY generateEmbedUrlForAnonymousUserCallback, // SUCCESS CALLBACK METHOD errorCallback // ERROR CALLBACK METHOD ) { const experienceConfiguration = { "QSearchBar": { Embedding with the QuickSight APIs 1610 Amazon QuickSight User Guide "InitialTopicId": initialTopicId // TOPIC ID CAN BE FOUND IN THE URL ON THE TOPIC AUTHOR PAGE } }; const generateEmbedUrlForAnonymousUserParams = { "AwsAccountId": accountId, "Namespace": quicksightNamespace, "AuthorizedResourceArns": authorizedResourceArns, "AllowedDomains": allowedDomains, "ExperienceConfiguration": experienceConfiguration, "SessionTags": sessionTags, "SessionLifetimeInMinutes": 600 }; const quicksightClient = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: AccessKeyId, secretAccessKey: SecretAccessKey, sessionToken: SessionToken, expiration: Expiration } }); quicksightClient.generateEmbedUrlForAnonymousUser(generateEmbedUrlForAnonymousUserParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO SECURE ACCESS TO THIS API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } generateEmbedUrlForAnonymousUserCallback(result); } Embedding with the QuickSight APIs 1611 Amazon QuickSight }); } Python3 import json import boto3 User Guide from botocore.exceptions import ClientError import time # Create QuickSight and STS clients quicksightClient = boto3.client('quicksight',region_name='us-west-2') sts = boto3.client('sts') # Function to generate embedded URL for anonymous user # accountId: YOUR AWS ACCOUNT ID # quicksightNamespace: VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING # authorizedResourceArns: TOPIC ARN LIST TO EMBED # allowedDomains: RUNTIME ALLOWED DOMAINS FOR EMBEDDING # experienceConfiguration: configuration which specifies the TOPIC ID to point URL to # sessionTags: SESSION TAGS USED FOR ROW-LEVEL SECURITY def generateEmbedUrlForAnonymousUser(accountId, quicksightNamespace, authorizedResourceArns, allowedDomains, experienceConfiguration, sessionTags): try: response = quicksightClient.generate_embed_url_for_anonymous_user( AwsAccountId = accountId, Namespace = quicksightNamespace, AuthorizedResourceArns = authorizedResourceArns, AllowedDomains = allowedDomains, ExperienceConfiguration = experienceConfiguration, SessionTags = sessionTags, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: print(e) Embedding with the QuickSight APIs 1612 Amazon QuickSight User Guide return "Error generating embeddedURL: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to generate the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksightClient = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksightClient.generateEmbedUrlForAnonymousUser({ 'AwsAccountId': '111122223333', 'Namespace': 'DEFAULT' 'AuthorizedResourceArns': '["topic-arn-topicId1","topic-arn-topicId2"]', 'AllowedDomains': allowedDomains, 'ExperienceConfiguration': { 'QSearchBar': { 'InitialTopicId': 'U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f' } }, 'SessionTags': '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag-key-1,"Value": tag-value-1}]', 'SessionLifetimeInMinutes': 15 }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. Embedding with the QuickSight APIs 1613 Amazon QuickSight { User Guide Status: 200, EmbedUrl : 'https://quicksightdomain/embed/12345/dashboards/67890/sheets/12345/ visuals/67890...', RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' } .NET/C# The following example shows the .NET/C# code that you can use on the app server to generate the URL for the embedded Q search bar. You can use this URL in your website or app to display the Q search bar. Example using System; using Amazon.QuickSight; using Amazon.QuickSight.Model; namespace GenerateQSearchBarEmbedUrlForAnonymousUser { class Program { static void Main(string[] args) { var quicksightClient = new AmazonQuickSightClient( AccessKey, SecretAccessKey, SessionToken, Amazon.RegionEndpoint.USEast1); try { AnonymousUserQSearchBarEmbeddingConfiguration anonymousUserQSearchBarEmbeddingConfiguration = new AnonymousUserQSearchBarEmbeddingConfiguration { InitialTopicId = "U4zJMVZ2n2stZflc8Ou3iKySEb3BEV6f" }; AnonymousUserEmbeddingExperienceConfiguration anonymousUserEmbeddingExperienceConfiguration = new AnonymousUserEmbeddingExperienceConfiguration { QSearchBar = anonymousUserQSearchBarEmbeddingConfiguration Embedding with the QuickSight APIs 1614 Amazon QuickSight }; User Guide Console.WriteLine( quicksightClient.GenerateEmbedUrlForAnonymousUserAsync(new GenerateEmbedUrlForAnonymousUserRequest { AwsAccountId = "111122223333", Namespace = "DEFAULT", AuthorizedResourceArns '["topic-arn-topicId1","topic-arn- topicId2"]', AllowedDomains = allowedDomains, ExperienceConfiguration = anonymousUserEmbeddingExperienceConfiguration, SessionTags = '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag-key-1,"Value": tag-value-1}]', SessionLifetimeInMinutes = 15, }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } } } } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GenerateEmbedUrlForAnonymousUser. aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/embedding_quicksight_q_search_bar_role" \ Embedding with the QuickSight APIs 1615 Amazon QuickSight User Guide --role-session-name anonymous caller The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. For a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these |
amazon-quicksight-user-440 | amazon-quicksight-user.pdf | 440 | Amazon QuickSight User Guide --role-session-name anonymous caller The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. For a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_q_search_bar_role/QuickSightEmbeddingAnonymousPolicy. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. In addition, it keeps each session separate and distinct. If you're using an array of web servers, for example for load balancing, and a session is reconnected to a different server, a new session begins. To get a signed URL for the dashboard, call generate-embed-url-for-anynymous-user from the app server. This returns the embeddable dashboard URL. The following example shows how to generate the URL for an embedded dashboard using a server-side call for users who are making anonymous visits to your web portal or app. aws quicksight generate-embed-url-for-anonymous-user \ --aws-account-id 111122223333 \ Embedding with the QuickSight APIs 1616 Amazon QuickSight User Guide --namespace default-or-something-else \ --authorized-resource-arns '["topic-arn-topicId1","topic-arn-topicId2"]' \ --allowed-domains '["domain1","domain2"]' \ --experience-configuration 'QSearchBar={InitialTopicId="topicId1"}' \ --session-tags '["Key": tag-key-1,"Value": tag-value-1,{"Key": tag-key-1,"Value": tag- value-1}]' \ --session-lifetime-in-minutes 15 For more information about using this operation, see GenerateEmbedUrlForRegisteredUser. You can use this and other API operations in your own code. Step 3: Embed the Q search bar URL Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. In the following section, you can find how to embed the Q search bar URL from step 3 in your website or application page. You do this with the Amazon QuickSight embedding SDK (JavaScript). With the SDK, you can do the following: • Place the Q search bar on an HTML page. • Pass parameters into the Q search bar. • Handle error states with messages that are customized to your application. To generate the URL that you can embed in your app, call the GenerateEmbedUrlForAnonymousUser API operation. This URL is valid for 5 minutes, and the resulting session is valid for up to 10 hours. The API operation provides the URL with an auth_code value that enables a single-sign on session. The following shows an example response from generate-embed-url-for-anonymous-user. //The URL returned is over 900 characters. For this example, we've shortened the string for Embedding with the QuickSight APIs 1617 Amazon QuickSight User Guide //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https://quicksightdomain/embedding/12345/q/search...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed the Q search bar in your webpage by using the QuickSight embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. To do this, make sure that the domain to host the embedded Q search bar is on the allow list, the list of approved domains for your QuickSight subscription. This requirement protects your data by keeping unapproved domains from hosting embedded Q search bar. For more information about adding domains for an embedded Q search bar, see Managing domains and embedding. When you use the QuickSight Embedding SDK, the Q search bar on your page is dynamically resized based on the state. By using the QuickSight Embedding SDK, you can also control parameters within the Q search bar and receive callbacks in terms of page load completion and errors. The following example shows how to use the generated URL. This code is generated on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Q Search Bar Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedQSearchBar = async() => { const { createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { Embedding with the QuickSight APIs 1618 Amazon QuickSight User Guide console.log('Context received a change', changeEvent, |
amazon-quicksight-user-441 | amazon-quicksight-user.pdf | 441 | the state. By using the QuickSight Embedding SDK, you can also control parameters within the Q search bar and receive callbacks in terms of page load completion and errors. The following example shows how to use the generated URL. This code is generated on your app server. SDK 2.0 <!DOCTYPE html> <html> <head> <title>Q Search Bar Embedding Example</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> const embedQSearchBar = async() => { const { createEmbeddingContext, } = QuickSightEmbedding; const embeddingContext = await createEmbeddingContext({ onChange: (changeEvent, metadata) => { Embedding with the QuickSight APIs 1618 Amazon QuickSight User Guide console.log('Context received a change', changeEvent, metadata); }, }); const frameOptions = { url: "<YOUR_EMBED_URL>", // replace this value with the url generated via embedding API container: '#experience-container', height: "700px", width: "1000px", onChange: (changeEvent, metadata) => { switch (changeEvent.eventName) { case 'FRAME_MOUNTED': { console.log("Do something when the experience frame is mounted."); break; } case 'FRAME_LOADED': { console.log("Do something when the experience frame is loaded."); break; } } }, }; const contentOptions = { hideTopicName: false, theme: '<YOUR_THEME_ID>', allowTopicSelection: true, onMessage: async (messageEvent, experienceMetadata) => { switch (messageEvent.eventName) { case 'Q_SEARCH_OPENED': { console.log("Do something when Q Search content expanded"); break; } case 'Q_SEARCH_CLOSED': { console.log("Do something when Q Search content collapsed"); break; } case 'Q_SEARCH_SIZE_CHANGED': { Embedding with the QuickSight APIs 1619 Amazon QuickSight User Guide console.log("Do something when Q Search size changed"); break; } case 'CONTENT_LOADED': { console.log("Do something when the Q Search is loaded."); break; } case 'ERROR_OCCURRED': { console.log("Do something when the Q Search fails loading."); break; } } } }; const embeddedDashboardExperience = await embeddingContext.embedQSearchBar(frameOptions, contentOptions); }; </script> </head> <body onload="embedQSearchBar()"> <div id="experience-container"></div> </body> </html> SDK 1.0 <!DOCTYPE html> <html> <head> <title>QuickSight Q Search Bar Embedding</title> <script src="https://unpkg.com/[email protected]/dist/ quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var session function onError(payload) { console.log("Do something when the session fails loading"); } Embedding with the QuickSight APIs 1620 Amazon QuickSight User Guide function onOpen() { console.log("Do something when the Q search bar opens"); } function onClose() { console.log("Do something when the Q search bar closes"); } function embedQSearchBar() { var containerDiv = document.getElementById("embeddingContainer"); var options = { url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", // replace this dummy url with the one generated via embedding API container: containerDiv, width: "1000px", locale: "en-US", qSearchBarOptions: { expandCallback: onOpen, collapseCallback: onClose, iconDisabled: false, topicNameDisabled: false, themeId: 'bdb844d0-0fe9-4d9d-b520-0fe602d93639', allowTopicSelection: true } }; session = QuickSightEmbedding.embedQSearchBar(options); session.on("error", onError); } function onCountryChange(obj) { session.setParameters({country: obj.value}); } </script> </head> <body onload="embedQSearchBar()"> <div id="embeddingContainer"></div> </body> </html> Embedding with the QuickSight APIs 1621 Amazon QuickSight User Guide For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded Q search bar on your website using JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Optional Amazon QuickSight Q search bar embedding functionalities Note The embedded QuickSight Q search bar provides the classic QuickSight Q&A experience. QuickSight integrates with Amazon Q Business to launch a new Generative Q&A experience. Developers are recommended to use the new Generative Q&A experience. For more information on the embedded Generative Q&A experience, see Embedding the Amazon Q in QuickSight Generative Q&A experience. The following optional functionalities are available for the embedded Q search bar using the embedding SDK. Invoke Q search bar actions The following options are only supported for Q search bar embedding. • Set a Q search bar question — This feature sends a question to the Q search bar and immediately queries the question. It also automatically opens the Q popover. qBar.setQBarQuestion('show me monthly revenue'); • Close the Q popover — This feature closes the Q popover and returns the iframe to the original Q search bar size. Embedding with the QuickSight APIs 1622 Amazon QuickSight User Guide qBar.closeQPopover(); For more information, see the QuickSight embedding SDK. Embedding analytics using the GetDashboardEmbedURL and GetSessionEmbedURL API operations Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers The following API operations for embedding Amazon QuickSight dashboards and the QuickSight console have been replaced by the GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser API operations. You can still use them to embed analytics in your application, but they are no longer maintained and do not contain the latest embedding features or functionality. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications • The GetDashboardEmbedUrl API operation embeds interactive dashboards. • The GetSessionEmbedUrl API operation embeds the QuickSight console. Topics • Embedding dashboards for everyone using GetDashboardEmbedURL (old API) • Embedding dashboards for registered users using GetDashboardEmbedUrl (old API) • Embedding the QuickSight console using GetSessionEmbedUrl (old API) Embedding dashboards for everyone using |
amazon-quicksight-user-442 | amazon-quicksight-user.pdf | 442 | been replaced by the GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser API operations. You can still use them to embed analytics in your application, but they are no longer maintained and do not contain the latest embedding features or functionality. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications • The GetDashboardEmbedUrl API operation embeds interactive dashboards. • The GetSessionEmbedUrl API operation embeds the QuickSight console. Topics • Embedding dashboards for everyone using GetDashboardEmbedURL (old API) • Embedding dashboards for registered users using GetDashboardEmbedUrl (old API) • Embedding the QuickSight console using GetSessionEmbedUrl (old API) Embedding dashboards for everyone using GetDashboardEmbedURL (old API) Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. Embedding with the QuickSight APIs 1623 Amazon QuickSight User Guide You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following sections, you can find detailed information on how to set up embedded Amazon QuickSight dashboards for everyone (nonauthenticated users) using GetDashboardEmbedURL. Topics • Step 1: Set up permissions • Step 2: Get the URL with the authentication code attached • Step 3: Embed the dashboard URL Step 1: Set up permissions Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. Applies to: Enterprise Edition Embedding with the QuickSight APIs 1624 Amazon QuickSight User Guide Intended audience: Amazon QuickSight developers In the following section, you can find out how to set up permissions for the backend application or web server. This task requires administrative access to IAM. Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access and permissions to the dashboard. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. The following sample policy provides these permissions for use with IdentityType=ANONYMOUS. For this approach to work, you also need a session pack, or session capacity pricing, on your AWS account. Otherwise, when a user tries to access the dashboard, the error UnsupportedPricingPlanException is returned. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GetDashboardEmbedUrl", "quickSight:GetAnonymousUserEmbedUrl" ], "Resource": "*" } ] } Your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf to open the dashboard. The following example shows a role called QuickSightEmbeddingAnonymousPolicy, which has the sample policy preceding as its resource. { "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "sts:AssumeRole", Embedding with the QuickSight APIs 1625 Amazon QuickSight User Guide "Resource": "arn:aws:iam::11112222333:role/QuickSightEmbeddingAnonymousPolicy" } } For more information regarding trust policies, see Temporary security credentials in IAM in the IAM User Guide. Step 2: Get the URL with the authentication code attached Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following section, you can find how to authenticate on behalf of the anonymous visitor and get the embeddable dashboard URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. The following examples perform the IAM authentication on the user's behalf. It passes an identifier as the unique role session ID. This code runs on your app server. Java import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; Embedding with the QuickSight APIs 1626 Amazon QuickSight User Guide import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlRequest; import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlResult; /** * Class to call QuickSight AWS SDK to get url for dashboard embedding. */ public class GetQuicksightEmbedUrlNoAuth { private static String ANONYMOUS = "ANONYMOUS"; private final AmazonQuickSight quickSightClient; public GetQuicksightEmbedUrlNoAuth() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access- key", "secret-key"); } @Override public void refresh() {} } ) .build(); } public String getQuicksightEmbedUrl( final String accountId, |
amazon-quicksight-user-443 | amazon-quicksight-user.pdf | 443 | import com.amazonaws.auth.BasicAWSCredentials; Embedding with the QuickSight APIs 1626 Amazon QuickSight User Guide import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlRequest; import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlResult; /** * Class to call QuickSight AWS SDK to get url for dashboard embedding. */ public class GetQuicksightEmbedUrlNoAuth { private static String ANONYMOUS = "ANONYMOUS"; private final AmazonQuickSight quickSightClient; public GetQuicksightEmbedUrlNoAuth() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access- key", "secret-key"); } @Override public void refresh() {} } ) .build(); } public String getQuicksightEmbedUrl( final String accountId, // YOUR AWS ACCOUNT ID final String dashboardId, // YOUR DASHBOARD ID TO EMBED final String addtionalDashboardIds, // ADDITIONAL DASHBOARD-1 ADDITIONAL DASHBOARD-2 final boolean resetDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE RESET BUTTON IN EMBEDDED DASHBAORD Embedding with the QuickSight APIs 1627 Amazon QuickSight User Guide final boolean undoRedoDisabled // OPTIONAL PARAMETER TO ENABLE DISABLE UNDO REDO BUTTONS IN EMBEDDED DASHBAORD ) throws Exception { GetDashboardEmbedUrlRequest getDashboardEmbedUrlRequest = new GetDashboardEmbedUrlRequest() .withDashboardId(dashboardId) .withAdditionalDashboardIds(addtionalDashboardIds) .withAwsAccountId(accountId) .withNamespace("default") // Anonymous embedding requires specifying a valid namespace for which you want the embedding url .withIdentityType(ANONYMOUS) .withResetDisabled(resetDisabled) .withUndoRedoDisabled(undoRedoDisabled); GetDashboardEmbedUrlResult dashboardEmbedUrl = quickSightClient.getDashboardEmbedUrl(getDashboardEmbedUrlRequest); return dashboardEmbedUrl.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function getDashboardEmbedURL( accountId, // YOUR AWS ACCOUNT ID dashboardId, // YOUR DASHBOARD ID TO EMBED additionalDashboardIds, // ADDITIONAL DASHBOARD-1 ADDITIONAL DASHBOARD-2 quicksightNamespace, // VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING resetDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE RESET BUTTON IN EMBEDDED DASHBAORD undoRedoDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE UNDO REDO BUTTONS IN EMBEDDED DASHBAORD getEmbedUrlCallback, // GETEMBEDURL SUCCESS CALLBACK METHOD errorCallback // GETEMBEDURL ERROR CALLBACK METHOD ) { const getDashboardParams = { AwsAccountId: accountId, DashboardId: dashboardId, AdditionalDashboardIds: additionalDashboardIds, Namespace: quicksightNamespace, Embedding with the QuickSight APIs 1628 Amazon QuickSight User Guide IdentityType: 'ANONYMOUS', ResetDisabled: resetDisabled, SessionLifetimeInMinutes: 600, UndoRedoDisabled: undoRedoDisabled }; const quicksightGetDashboard = new AWS.QuickSight({ region: process.env.AWS_REGION, }); quicksightGetDashboard.getDashboardEmbedUrl(getDashboardParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO SECURE ACCESS TO GETEMBEDURL API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } getEmbedUrlCallback(result); } }); } Python3 import json import boto3 from botocore.exceptions import ClientError import time # Create QuickSight and STS clients qs = boto3.client('quicksight',region_name='us-east-1') sts = boto3.client('sts') # Function to generate embedded URL Embedding with the QuickSight APIs 1629 Amazon QuickSight User Guide # accountId: YOUR AWS ACCOUNT ID # dashboardId: YOUR DASHBOARD ID TO EMBED # additionalDashboardIds: ADDITIONAL DASHBOARD-1 ADDITIONAL DASHBOARD-2 WITHOUT COMMAS # quicksightNamespace: VALID NAMESPACE WHERE YOU WANT TO DO NOAUTH EMBEDDING # resetDisabled: PARAMETER TO ENABLE DISABLE RESET BUTTON IN EMBEDDED DASHBAORD # undoRedoDisabled: OPTIONAL PARAMETER TO ENABLE DISABLE UNDO REDO BUTTONS IN EMBEDDED DASHBAORD def getDashboardURL(accountId, dashboardId, quicksightNamespace, resetDisabled, undoRedoDisabled): try: response = qs.get_dashboard_embed_url( AwsAccountId = accountId, DashboardId = dashboardId, AdditionalDashboardIds = additionalDashboardIds, Namespace = quicksightNamespace, IdentityType = 'ANONYMOUS', SessionLifetimeInMinutes = 600, UndoRedoDisabled = undoRedoDisabled, ResetDisabled = resetDisabled ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: print(e) return "Error generating embeddedURL: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to get the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example const AWS = require('aws-sdk'); const https = require('https'); Embedding with the QuickSight APIs 1630 Amazon QuickSight User Guide var quicksight = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksight.getDashboardEmbedUrl({ 'AwsAccountId': '111122223333', 'DashboardId': 'dashboard-id', 'AdditionalDashboardIds': 'added-dashboard-id-1 added-dashboard-id-2 added-dashboard-id-3' 'Namespace' : 'default', 'IdentityType': 'ANONYMOUS', 'SessionLifetimeInMinutes': 100, 'UndoRedoDisabled': false, 'ResetDisabled': true }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { Status: 200, EmbedUrl: 'https://dashboards.example.com/ embed/620bef10822743fab329fb3751187d2d… RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' } .NET/C# The following example shows the .NET/C# code that you can use on the app server to get the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example Embedding with the QuickSight APIs 1631 Amazon QuickSight User Guide var client = new AmazonQuickSightClient( AccessKey, SecretAccessKey, sessionToken, Amazon.RegionEndpoint.USEast1); try { Console.WriteLine( client.GetDashboardEmbedUrlAsync(new GetDashboardEmbedUrlRequest { AwsAccountId = “111122223333”, DashboardId = "dashboard-id", AdditionalDashboardIds = "added-dashboard-id-1 added- dashboard-id-2 added-dashboard-id-3", Namespace = default, IdentityType = IdentityType.ANONYMOUS, SessionLifetimeInMinutes = 600, UndoRedoDisabled = false, ResetDisabled = true }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a |
amazon-quicksight-user-444 | amazon-quicksight-user.pdf | 444 | User Guide var client = new AmazonQuickSightClient( AccessKey, SecretAccessKey, sessionToken, Amazon.RegionEndpoint.USEast1); try { Console.WriteLine( client.GetDashboardEmbedUrlAsync(new GetDashboardEmbedUrlRequest { AwsAccountId = “111122223333”, DashboardId = "dashboard-id", AdditionalDashboardIds = "added-dashboard-id-1 added- dashboard-id-2 added-dashboard-id-3", Namespace = default, IdentityType = IdentityType.ANONYMOUS, SessionLifetimeInMinutes = 600, UndoRedoDisabled = false, ResetDisabled = true }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you are using Security Assertion Markup Language (SAML) to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GetDashboardEmbedURL. aws sts assume-role \ --role-arn "arn:aws:iam::11112222333:role/QuickSightEmbeddingAnonymousPolicy" \ Embedding with the QuickSight APIs 1632 Amazon QuickSight User Guide --role-session-name anonymous caller The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you are using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_dashboard_role/QuickSightEmbeddingAnonymousPolicy. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each visiting user. It also keeps each session separate and distinct. If you're using an array of web servers, for example for load balancing, and a session is reconnected to a different server, a new session begins. To get a signed URL for the dashboard, call get-dashboard-embed-url from the app server. This returns the embeddable dashboard URL. The following example shows how to get the URL for an embedded dashboard using a server-side call for users who are making anonymous visits to your web portal or app. aws quicksight get-dashboard-embed-url \ --aws-account-id 111122223333 \ Embedding with the QuickSight APIs 1633 Amazon QuickSight User Guide --dashboard-id dashboard-id \ --additional-dashboard-ids added-dashboard-id-1 added-dashboard-id-2 added- dashboard-id-3 --namespace default-or-something-else \ --identity-type ANONYMOUS \ --session-lifetime-in-minutes 30 \ --undo-redo-disabled true \ --reset-disabled true \ --user-arn arn:aws:quicksight:us-east-1:111122223333:user/ default/QuickSightEmbeddingAnonymousPolicy/embeddingsession For more information on using this operation, see GetDashboardEmbedUrl. You can use this and other API operations in your own code. Step 3: Embed the dashboard URL Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following section, you can find out how you can use the QuickSight embedding SDK (JavaScript) to embed the dashboard URL from step 2 in your website or application page. With the SDK, you can do the following: • Place the dashboard on an HTML page. • Pass parameters into the dashboard. Embedding with the QuickSight APIs 1634 Amazon QuickSight User Guide • Handle error states with messages that are customized to your application. Call the GetDashboardEmbedUrl API operation to get the URL that you can embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the URL with an auth_code that enables a single-sign on session. The following shows an example response from get-dashboard-embed-url. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https: //dashboards.example.com/ embed/620bef10822743fab329fb3751187d2d...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed this dashboard in your web page by using the QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of page load completion and errors. The following example shows how to use the generated URL. This code resides on your app server. <!DOCTYPE html> |
amazon-quicksight-user-445 | amazon-quicksight-user.pdf | 445 | QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of page load completion and errors. The following example shows how to use the generated URL. This code resides on your app server. <!DOCTYPE html> <html> <head> <title>Basic Embed</title> <!-- You can download the latest QuickSight embedding SDK version from https:// www.npmjs.com/package/amazon-quicksight-embedding-sdk --> <!-- Or you can do "npm install amazon-quicksight-embedding-sdk", if you use npm for javascript dependencies --> <script src="./quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var dashboard; function embedDashboard() { Embedding with the QuickSight APIs 1635 Amazon QuickSight User Guide var containerDiv = document.getElementById("embeddingContainer"); var options = { // replace this dummy url with the one generated via embedding API url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", container: containerDiv, scrolling: "no", height: "700px", width: "1000px", footerPaddingEnabled: true }; dashboard = QuickSightEmbedding.embedDashboard(options); } </script> </head> <body onload="embedDashboard()"> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded dashboard on your website using JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest QuickSight embedding SDK version from https://www.npmjs.com/package/ amazon-quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Embedding dashboards for registered users using GetDashboardEmbedUrl (old API) Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. Embedding with the QuickSight APIs 1636 Amazon QuickSight User Guide You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. In the following sections, you can find detailed information on how to set up embedded Amazon QuickSight dashboards for registered users using GetDashboardEmbedUrl. Topics • Step 1: Set up permissions • Step 2: Get the URL with the authentication code attached • Step 3: Embed the dashboard URL Step 1: Set up permissions Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. In the following section, you can find out how to set up permissions for the backend application or web server. This task requires administrative access to IAM. Each user who accesses a dashboard assumes a role that gives them Amazon QuickSight access and permissions to the dashboard. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. The IAM role needs to provide permissions to retrieve dashboard URLs. For this, you add quicksight:GetDashboardEmbedUrl. The following sample policy provides these permissions for use with IdentityType=IAM. { Embedding with the QuickSight APIs 1637 Amazon QuickSight User Guide "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GetDashboardEmbedUrl" ], "Resource": "*" } ] } The following sample policy provides permission to retrieve a dashboard URL. You use the policy with quicksight:RegisterUser if you are creating first-time users who are to be QuickSight readers. { "Version": "2012-10-17", "Statement": [ { "Action": "quicksight:RegisterUser", "Resource": "*", "Effect": "Allow" }, { "Action": "quicksight:GetDashboardEmbedUrl", "Resource": "*", "Effect": "Allow" } ] } If you use QUICKSIGHT as your identityType and provide the user's Amazon Resource Name (ARN), you also need to allow the quicksight:GetAuthCode action in your policy. The following sample policy provides this permission. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ Embedding with the QuickSight APIs 1638 Amazon QuickSight User Guide "quicksight:GetDashboardEmbedUrl", "quicksight:GetAuthCode" ], "Resource": "*" } ] } Your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a role called embedding_quicksight_dashboard_role, which has the sample policy preceding as its resource. { "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_dashboard_role" } } For more information regarding trust policies for OpenID Connect or SAML authentication, see the following sections of the IAM User Guide: • Creating a role for web |
amazon-quicksight-user-446 | amazon-quicksight-user.pdf | 446 | must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a role called embedding_quicksight_dashboard_role, which has the sample policy preceding as its resource. { "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_dashboard_role" } } For more information regarding trust policies for OpenID Connect or SAML authentication, see the following sections of the IAM User Guide: • Creating a role for web identity or OpenID Connect federation (console) • Creating a role for SAML 2.0 federation (console) Step 2: Get the URL with the authentication code attached Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. Embedding with the QuickSight APIs 1639 Amazon QuickSight User Guide In the following section, you can find out how to authenticate your user and get the embeddable dashboard URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing the described steps ensures that each viewer of the dashboard is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. The following examples perform the IAM authentication on the user's behalf. This code runs on your app server. Java import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.AWSStaticCredentialsProvider; import com.amazonaws.auth.BasicSessionCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlRequest; import com.amazonaws.services.quicksight.model.GetDashboardEmbedUrlResult; import com.amazonaws.services.securitytoken.AWSSecurityTokenService; import com.amazonaws.services.securitytoken.model.AssumeRoleRequest; import com.amazonaws.services.securitytoken.model.AssumeRoleResult; /** * Class to call QuickSight AWS SDK to get url for dashboard embedding. */ public class GetQuicksightEmbedUrlIAMAuth { private static String IAM = "IAM"; private final AmazonQuickSight quickSightClient; private final AWSSecurityTokenService awsSecurityTokenService; public GetQuicksightEmbedUrlIAMAuth(final AWSSecurityTokenService awsSecurityTokenService) { Embedding with the QuickSight APIs 1640 Amazon QuickSight User Guide this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access- key", "secret-key"); } @Override public void refresh() {} } ) .build(); this.awsSecurityTokenService = awsSecurityTokenService; } public String getQuicksightEmbedUrl( final String accountId, // YOUR AWS ACCOUNT ID final String dashboardId, // YOUR DASHBOARD ID TO EMBED final String openIdToken, // TOKEN TO ASSUME ROLE WITH ROLEARN final String roleArn, // IAM USER ROLE TO USE FOR EMBEDDING final String sessionName, // SESSION NAME FOR THE ROLEARN ASSUME ROLE final boolean resetDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE RESET BUTTON IN EMBEDDED DASHBAORD final boolean undoRedoDisabled // OPTIONAL PARAMETER TO ENABLE DISABLE UNDO REDO BUTTONS IN EMBEDDED DASHBAORD ) throws Exception { AssumeRoleRequest request = new AssumeRoleRequest() .withRoleArn(roleArn) .withRoleSessionName(sessionName) .withTokenCode(openIdToken) .withDurationSeconds(3600); AssumeRoleResult assumeRoleResult = awsSecurityTokenService.assumeRole(request); AWSCredentials temporaryCredentials = new BasicSessionCredentials( assumeRoleResult.getCredentials().getAccessKeyId(), assumeRoleResult.getCredentials().getSecretAccessKey(), assumeRoleResult.getCredentials().getSessionToken()); Embedding with the QuickSight APIs 1641 Amazon QuickSight User Guide AWSStaticCredentialsProvider awsStaticCredentialsProvider = new AWSStaticCredentialsProvider(temporaryCredentials); GetDashboardEmbedUrlRequest getDashboardEmbedUrlRequest = new GetDashboardEmbedUrlRequest() .withDashboardId(dashboardId) .withAwsAccountId(accountId) .withIdentityType(IAM) .withResetDisabled(resetDisabled) .withUndoRedoDisabled(undoRedoDisabled) .withRequestCredentialsProvider(awsStaticCredentialsProvider); GetDashboardEmbedUrlResult dashboardEmbedUrl = quickSightClient.getDashboardEmbedUrl(getDashboardEmbedUrlRequest); return dashboardEmbedUrl.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function getDashboardEmbedURL( accountId, // YOUR AWS ACCOUNT ID dashboardId, // YOUR DASHBOARD ID TO EMBED openIdToken, // TOKEN TO ASSUME ROLE WITH ROLEARN roleArn, // IAM USER ROLE TO USE FOR EMBEDDING sessionName, // SESSION NAME FOR THE ROLEARN ASSUME ROLE resetDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE RESET BUTTON IN EMBEDDED DASHBAORD undoRedoDisabled, // OPTIONAL PARAMETER TO ENABLE DISABLE UNDO REDO BUTTONS IN EMBEDDED DASHBAORD getEmbedUrlCallback, // GETEMBEDURL SUCCESS CALLBACK METHOD errorCallback // GETEMBEDURL ERROR CALLBACK METHOD ) { const stsClient = new AWS.STS(); let stsParams = { RoleSessionName: sessionName, WebIdentityToken: openIdToken, RoleArn: roleArn } Embedding with the QuickSight APIs 1642 Amazon QuickSight User Guide stsClient.assumeRoleWithWebIdentity(stsParams, function(err, data) { if (err) { console.log('Error assuming role'); console.log(err, err.stack); errorCallback(err); } else { const getDashboardParams = { AwsAccountId: accountId, DashboardId: dashboardId, IdentityType: 'IAM', ResetDisabled: resetDisabled, SessionLifetimeInMinutes: 600, UndoRedoDisabled: undoRedoDisabled }; const quicksightGetDashboard = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: data.Credentials.AccessKeyId, secretAccessKey: data.Credentials.SecretAccessKey, sessionToken: data.Credentials.SessionToken, expiration: data.Credentials.Expiration } }); quicksightGetDashboard.getDashboardEmbedUrl(getDashboardParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO SECURE ACCESS TO GETEMBEDURL API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } getEmbedUrlCallback(result); } Embedding with the QuickSight APIs 1643 Amazon QuickSight }); } }); } Python3 import json import boto3 User Guide from botocore.exceptions import ClientError # Create QuickSight and STS clients qs = boto3.client('quicksight',region_name='us-east-1') sts = boto3.client('sts') # Function |
amazon-quicksight-user-447 | amazon-quicksight-user.pdf | 447 | const quicksightGetDashboard = new AWS.QuickSight({ region: process.env.AWS_REGION, credentials: { accessKeyId: data.Credentials.AccessKeyId, secretAccessKey: data.Credentials.SecretAccessKey, sessionToken: data.Credentials.SessionToken, expiration: data.Credentials.Expiration } }); quicksightGetDashboard.getDashboardEmbedUrl(getDashboardParams, function(err, data) { if (err) { console.log(err, err.stack); errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO SECURE ACCESS TO GETEMBEDURL API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } getEmbedUrlCallback(result); } Embedding with the QuickSight APIs 1643 Amazon QuickSight }); } }); } Python3 import json import boto3 User Guide from botocore.exceptions import ClientError # Create QuickSight and STS clients qs = boto3.client('quicksight',region_name='us-east-1') sts = boto3.client('sts') # Function to generate embedded URL # accountId: YOUR AWS ACCOUNT ID # dashboardId: YOUR DASHBOARD ID TO EMBED # openIdToken: TOKEN TO ASSUME ROLE WITH ROLEARN # roleArn: IAM USER ROLE TO USE FOR EMBEDDING # sessionName: SESSION NAME FOR THE ROLEARN ASSUME ROLE # resetDisabled: PARAMETER TO ENABLE DISABLE RESET BUTTON IN EMBEDDED DASHBAORD # undoRedoDisabled: PARAMETER TO ENABLE DISABLE UNDO REDO BUTTONS IN EMBEDDED DASHBAORD def getDashboardURL(accountId, dashboardId, openIdToken, roleArn, sessionName, resetDisabled, undoRedoDisabled): try: assumedRole = sts.assume_role( RoleArn = roleArn, RoleSessionName = sessionName, WebIdentityToken = openIdToken ) except ClientError as e: return "Error assuming role: " + str(e) else: assumedRoleSession = boto3.Session( aws_access_key_id = assumedRole['Credentials']['AccessKeyId'], aws_secret_access_key = assumedRole['Credentials']['SecretAccessKey'], aws_session_token = assumedRole['Credentials']['SessionToken'], ) try: quickSight = assumedRoleSession.client('quicksight',region_name='us- east-1') Embedding with the QuickSight APIs 1644 Amazon QuickSight User Guide response = quickSight.get_dashboard_embed_url( AwsAccountId = accountId, DashboardId = dashboardId, IdentityType = 'IAM', SessionLifetimeInMinutes = 600, UndoRedoDisabled = undoRedoDisabled, ResetDisabled = resetDisabled ) return { 'statusCode': 200, 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control- Allow-Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: return "Error generating embeddedURL: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to get the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksight = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksight.getDashboardEmbedUrl({ 'AwsAccountId': '111122223333', 'DashboardId': '1c1fe111-e2d2-3b30-44ef-a0e111111cde', 'IdentityType': 'IAM', 'ResetDisabled': true, 'SessionLifetimeInMinutes': 100, 'UndoRedoDisabled': false, Embedding with the QuickSight APIs 1645 Amazon QuickSight User Guide 'StatePersistenceEnabled': true }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { Status: 200, EmbedUrl: 'https://dashboards.example.com/ embed/620bef10822743fab329fb3751187d2d… RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' } .NET/C# The following example shows the .NET/C# code that you can use on the app server to get the URL for the embedded dashboard. You can use this URL in your website or app to display the dashboard. Example var client = new AmazonQuickSightClient( AccessKey, SecretAccessKey, sessionToken, Amazon.RegionEndpoint.USEast1); try { Console.WriteLine( client.GetDashboardEmbedUrlAsync(new GetDashboardEmbedUrlRequest { AwsAccountId = “111122223333”, DashboardId = "1c1fe111-e2d2-3b30-44ef-a0e111111cde", IdentityType = EmbeddingIdentityType.IAM, ResetDisabled = true, SessionLifetimeInMinutes = 100, Embedding with the QuickSight APIs 1646 Amazon QuickSight User Guide UndoRedoDisabled = false, StatePersistenceEnabled = true }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GetDashboardEmbedURL. If you are taking a just-in- time approach to add users when they first open a dashboard, the role also needs permissions enabled for quicksight:RegisterUser. aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --role-session-name [email protected] The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID Embedding with the QuickSight APIs 1647 Amazon QuickSight User Guide • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you are using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_dashboard_role/[email protected]. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. |
amazon-quicksight-user-448 | amazon-quicksight-user.pdf | 448 | If you are using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_dashboard_role/[email protected]. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. The role session ID also becomes the user name in QuickSight. You can use this pattern to provision your users in QuickSight ahead of time, or to provision them the first time they access the dashboard. The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM \ --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --user-role READER \ --user-name jhnd \ --session-name "[email protected]" \ --email [email protected] \ --region us-east-1 \ --custom-permissions-name TeamA1 Embedding with the QuickSight APIs 1648 Amazon QuickSight User Guide If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set them up. Instead, they should be automatically subscribed the first time they access QuickSight. For Microsoft AD users, you can use DescribeUser to get the user ARN. The first time a user accesses QuickSight, you can also add this user to the group that the dashboard is shared with. The following example shows the CLI command to add a user to a group. aws quicksight create-group-membership \ --aws-account-id=111122223333 \ --namespace=default \ --group-name=financeusers \ --member-name="embedding_quicksight_dashboard_role/[email protected]" You now have a user of your app who is also a user of QuickSight, and who has access to the dashboard. Finally, to get a signed URL for the dashboard, call get-dashboard-embed-url from the app server. This returns the embeddable dashboard URL. The following example shows how to get the URL for an embedded dashboard using a server-side call for users authenticated through AWS Managed Microsoft AD or IAM Identity Center. aws quicksight get-dashboard-embed-url \ --aws-account-id 111122223333 \ --dashboard-id 1a1ac2b2-3fc3-4b44-5e5d-c6db6778df89 \ --identity-type IAM \ --session-lifetime-in-minutes 30 \ --undo-redo-disabled true \ --reset-disabled true \ --state-persistence-enabled true \ --user-arn arn:aws:quicksight:us-east-1:111122223333:user/default/ embedding_quicksight_dashboard_role/embeddingsession For more information on using this operation, see GetDashboardEmbedUrl. You can use this and other API operations in your own code. Embedding with the QuickSight APIs 1649 Amazon QuickSight User Guide Step 3: Embed the dashboard URL Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. In the following section, you can find out how you can use the Amazon QuickSight embedding SDK (JavaScript) to embed the dashboard URL from step 3 in your website or application page. With the SDK, you can do the following: • Place the dashboard on an HTML page. • Pass parameters into the dashboard. • Handle error states with messages that are customized to your application. Call the GetDashboardEmbedUrl API operation to get the URL that you can embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the URL with an auth_code that enables a single-sign on session. The following shows an example response from get-dashboard-embed-url. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https: //dashboards.example.com/ embed/620bef10822743fab329fb3751187d2d...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed this dashboard in your webpage by using the QuickSight embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height Embedding with the QuickSight APIs 1650 Amazon QuickSight User Guide and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the Amazon QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of page load completion and errors. The following example shows how to use the generated URL. This code is generated on your app server. <!DOCTYPE html> <html> <head> <title>Basic Embed</title> <script src="./quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var dashboard; function embedDashboard() { var containerDiv = document.getElementById("embeddingContainer"); var options = { // replace this dummy url with the one generated via embedding API url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", container: |
amazon-quicksight-user-449 | amazon-quicksight-user.pdf | 449 | User Guide and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the Amazon QuickSight Embedding SDK, you can also control parameters within the dashboard and receive callbacks in terms of page load completion and errors. The following example shows how to use the generated URL. This code is generated on your app server. <!DOCTYPE html> <html> <head> <title>Basic Embed</title> <script src="./quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var dashboard; function embedDashboard() { var containerDiv = document.getElementById("embeddingContainer"); var options = { // replace this dummy url with the one generated via embedding API url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", container: containerDiv, scrolling: "no", height: "700px", width: "1000px", footerPaddingEnabled: true }; dashboard = QuickSightEmbedding.embedDashboard(options); } </script> </head> <body onload="embedDashboard()"> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded dashboard on your website using JavaScript. To get your copy, do one of the following: Embedding with the QuickSight APIs 1651 Amazon QuickSight User Guide • Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Embedding the QuickSight console using GetSessionEmbedUrl (old API) Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. Applies to: Enterprise Edition Intended audience: Amazon QuickSight developers In the following sections, you can find detailed information on how to provide the Amazon QuickSight console experience in a custom-branded authoring portal for registered users using the GetSessionEmbedUrl API. Topics • Step 1: Set up permissions • Step 2: Get the URL with the authentication code attached • Step 3: Embed the console session URL Embedding with the QuickSight APIs 1652 Amazon QuickSight Step 1: Set up permissions Important User Guide Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. In the following section, you can find out how to set up permissions for the backend application or web server. This task requires administrative access to IAM. Each user who accesses a QuickSight assumes a role that gives them Amazon QuickSight access and permissions to the console session. To make this possible, create an IAM role in your AWS account. Associate an IAM policy with the role to provide permissions to any user who assumes it. Add quicksight:RegisterUser permissions to ensure that the reader can access QuickSight in a read-only fashion, and not have access to any other data or creation capability. The IAM role also needs to provide permissions to retrieve console session URLs. For this, you add quicksight:GetSessionEmbedUrl. The following sample policy provides these permissions for use with IdentityType=IAM. { "Version": "2012-10-17", "Statement": [ { "Action": "quicksight:RegisterUser", "Resource": "*", "Effect": "Allow" }, { "Action": "quicksight:GetSessionEmbedUrl", "Resource": "*", "Effect": "Allow" } ] } Embedding with the QuickSight APIs 1653 Amazon QuickSight User Guide The following sample policy provides permission to retrieve a console session URL. You use the policy without quicksight:RegisterUser if you are creating users before they access an embedded session. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GetSessionEmbedUrl" ], "Resource": "*" } ] } If you use QUICKSIGHT as your identityType and provide the user's Amazon Resource Name (ARN), you also need to allow the quicksight:GetAuthCode action in your policy. The following sample policy provides this permission. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "quicksight:GetSessionEmbedUrl", "quicksight:GetAuthCode" ], "Resource": "*" } ] } Your application's IAM identity must have a trust policy associated with it to allow access to the role that you just created. This means that when a user accesses your application, your application can assume the role on the user's behalf and provision the user in QuickSight. The following example shows a role called embedding_quicksight_console_session_role, which has the sample policy preceding as its resource. Embedding with the QuickSight APIs 1654 Amazon QuickSight User Guide { "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_console_session_role" } } For more information regarding trust policies for OpenID Connect or SAML authentication, see the following sections of the IAM User Guide: • Creating a role for web identity or OpenID Connect federation (console) • Creating a role for SAML 2.0 federation (console) Step 2: Get the URL with the authentication |
amazon-quicksight-user-450 | amazon-quicksight-user.pdf | 450 | on the user's behalf and provision the user in QuickSight. The following example shows a role called embedding_quicksight_console_session_role, which has the sample policy preceding as its resource. Embedding with the QuickSight APIs 1654 Amazon QuickSight User Guide { "Version": "2012-10-17", "Statement": { "Effect": "Allow", "Action": "sts:AssumeRole", "Resource": "arn:aws:iam::11112222333:role/embedding_quicksight_console_session_role" } } For more information regarding trust policies for OpenID Connect or SAML authentication, see the following sections of the IAM User Guide: • Creating a role for web identity or OpenID Connect federation (console) • Creating a role for SAML 2.0 federation (console) Step 2: Get the URL with the authentication code attached Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. In the following section, you can find out how to authenticate your user and get the embeddable console session URL on your application server. When a user accesses your app, the app assumes the IAM role on the user's behalf. Then it adds the user to QuickSight, if that user doesn't already exist. Next, it passes an identifier as the unique role session ID. Performing the described steps ensures that each viewer of the console session is uniquely provisioned in QuickSight. It also enforces per-user settings, such as the row-level security and dynamic defaults for parameters. Embedding with the QuickSight APIs 1655 Amazon QuickSight User Guide The following examples perform the IAM authentication on the user's behalf. This code runs on your app server. Java import com.amazonaws.auth.AWSCredentials; import com.amazonaws.auth.BasicAWSCredentials; import com.amazonaws.auth.AWSCredentialsProvider; import com.amazonaws.regions.Regions; import com.amazonaws.services.quicksight.AmazonQuickSight; import com.amazonaws.services.quicksight.AmazonQuickSightClientBuilder; import com.amazonaws.services.quicksight.model.GetSessionEmbedUrlRequest; import com.amazonaws.services.quicksight.model.GetSessionEmbedUrlResult; /** * Class to call QuickSight AWS SDK to get url for session embedding. */ public class GetSessionEmbedUrlQSAuth { private final AmazonQuickSight quickSightClient; public GetSessionEmbedUrlQSAuth() { this.quickSightClient = AmazonQuickSightClientBuilder .standard() .withRegion(Regions.US_EAST_1.getName()) .withCredentials(new AWSCredentialsProvider() { @Override public AWSCredentials getCredentials() { // provide actual IAM access key and secret key here return new BasicAWSCredentials("access- key", "secret-key"); } @Override public void refresh() {} } ) .build(); } public String getQuicksightEmbedUrl( final String accountId, // YOUR AWS ACCOUNT ID Embedding with the QuickSight APIs 1656 Amazon QuickSight User Guide final String userArn // REGISTERED USER ARN TO USE FOR EMBEDDING. REFER TO GETEMBEDURL SECTION IN DEV PORTAL TO FIND OUT HOW TO GET USER ARN FOR A QUICKSIGHT USER ) throws Exception { GetSessionEmbedUrlRequest getSessionEmbedUrlRequest = new GetSessionEmbedUrlRequest() .withAwsAccountId(accountId) .withEntryPoint("/start") .withUserArn(userArn); GetSessionEmbedUrlResult sessionEmbedUrl = quickSightClient.getSessionEmbedUrl(getSessionEmbedUrlRequest); return sessionEmbedUrl.getEmbedUrl(); } } JavaScript global.fetch = require('node-fetch'); const AWS = require('aws-sdk'); function getSessionEmbedURL( accountId, // YOUR AWS ACCOUNT ID userArn, // REGISTERED USER ARN TO USE FOR EMBEDDING. REFER TO GETEMBEDURL SECTION IN DEV PORTAL TO FIND OUT HOW TO GET USER ARN FOR A QUICKSIGHT USER getEmbedUrlCallback, // GETEMBEDURL SUCCESS CALLBACK METHOD errorCallback // GETEMBEDURL ERROR CALLBACK METHOD ) { const getSessionParams = { AwsAccountId: accountId, EntryPoint: "/start", UserArn: userArn, SessionLifetimeInMinutes: 600, }; const quicksightGetSession = new AWS.QuickSight({ region: process.env.AWS_REGION, }); quicksightGetSession.getSessionEmbedUrl(getSessionParams, function(err, data) { if (err) { console.log(err, err.stack); Embedding with the QuickSight APIs 1657 Amazon QuickSight User Guide errorCallback(err); } else { const result = { "statusCode": 200, "headers": { "Access-Control-Allow-Origin": "*", // USE YOUR WEBSITE DOMAIN TO SECURE ACCESS TO GETEMBEDURL API "Access-Control-Allow-Headers": "Content-Type" }, "body": JSON.stringify(data), "isBase64Encoded": false } getEmbedUrlCallback(result); } }); } Python3 import json import boto3 from botocore.exceptions import ClientError import time # Create QuickSight and STS clients qs = boto3.client('quicksight',region_name='us-east-1') sts = boto3.client('sts') # Function to generate embedded URL # accountId: YOUR AWS ACCOUNT ID # userArn: REGISTERED USER ARN TO USE FOR EMBEDDING. REFER TO GETEMBEDURL SECTION IN DEV PORTAL TO FIND OUT HOW TO GET USER ARN FOR A QUICKSIGHT USER def getSessionEmbedURL(accountId, userArn): try: response = qs.get_session_embed_url( AwsAccountId = accountId, EntryPoint = "/start", UserArn = userArn, SessionLifetimeInMinutes = 600 ) return { 'statusCode': 200, Embedding with the QuickSight APIs 1658 Amazon QuickSight User Guide 'headers': {"Access-Control-Allow-Origin": "*", "Access-Control-Allow- Headers": "Content-Type"}, 'body': json.dumps(response), 'isBase64Encoded': bool('false') } except ClientError as e: print(e) return "Error generating embeddedURL: " + str(e) Node.js The following example shows the JavaScript (Node.js) that you can use on the app server to get the URL for the embedded console session. You can use this URL in your website or app to display the console session. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksight = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksight.GetSessionEmbedUrl({ 'AwsAccountId': '111122223333', 'EntryPoint': 'https://url-for-console-page-to-open', 'SessionLifetimeInMinutes': 600, 'UserArn': 'USER_ARN' }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. Embedding with the QuickSight APIs 1659 Amazon QuickSight User Guide { Status: 200, |
amazon-quicksight-user-451 | amazon-quicksight-user.pdf | 451 | get the URL for the embedded console session. You can use this URL in your website or app to display the console session. Example const AWS = require('aws-sdk'); const https = require('https'); var quicksight = new AWS.Service({ apiConfig: require('./quicksight-2018-04-01.min.json'), region: 'us-east-1', }); quicksight.GetSessionEmbedUrl({ 'AwsAccountId': '111122223333', 'EntryPoint': 'https://url-for-console-page-to-open', 'SessionLifetimeInMinutes': 600, 'UserArn': 'USER_ARN' }, function(err, data) { console.log('Errors: '); console.log(err); console.log('Response: '); console.log(data); }); Example //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. Embedding with the QuickSight APIs 1659 Amazon QuickSight User Guide { Status: 200, EmbedUrl: 'https://dashboards.example.com/ embed/620bef10822743fab329fb3751187d2d… RequestId: '7bee030e-f191-45c4-97fe-d9faf0e03713' } .NET/C# The following example shows the .NET/C# code that you can use on the app server to get the URL for the embedded console session. You can use this URL in your website or app to display the console. Example var client = new AmazonQuickSightClient( AccessKey, SecretAccessKey, sessionToken, Amazon.RegionEndpoint.USEast1); try { Console.WriteLine( client.GetSessionEmbedUrlAsync(new GetSessionEmbedUrlRequest { 'AwsAccountId': '111122223333', 'EntryPoint': 'https://url-for-console-page-to-open', 'SessionLifetimeInMinutes': 600, 'UserArn': 'USER_ARN' AwsAccountId = 111122223333, EntryPoint = https://url-for-console-page-to-open, SessionLifetimeInMinutes = 600, UserArn = 'USER_ARN' }).Result.EmbedUrl ); } catch (Exception ex) { Console.WriteLine(ex.Message); } AWS CLI To assume the role, choose one of the following AWS Security Token Service (AWS STS) API operations: Embedding with the QuickSight APIs 1660 Amazon QuickSight User Guide • AssumeRole – Use this operation when you are using an IAM identity to assume the role. • AssumeRoleWithWebIdentity – Use this operation when you are using a web identity provider to authenticate your user. • AssumeRoleWithSaml – Use this operation when you are using SAML to authenticate your users. The following example shows the CLI command to set the IAM role. The role needs to have permissions enabled for quicksight:GetSessionEmbedUrl. If you are taking a just-in-time approach to add users when they first open QuickSight, the role also needs permissions enabled for quicksight:RegisterUser. aws sts assume-role \ --role-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --role-session-name [email protected] The assume-role operation returns three output parameters: the access key, the secret key, and the session token. Note If you get an ExpiredToken error when calling the AssumeRole operation, this is probably because the previous SESSION TOKEN is still in the environment variables. Clear this by setting the following variables: • AWS_ACCESS_KEY_ID • AWS_SECRET_ACCESS_KEY • AWS_SESSION_TOKEN The following example shows how to set these three parameters in the CLI. If you are using a Microsoft Windows machine, use set instead of export. export AWS_ACCESS_KEY_ID = "access_key_from_assume_role" export AWS_SECRET_ACCESS_KEY = "secret_key_from_assume_role" export AWS_SESSION_TOKEN = "session_token_from_assume_role" Embedding with the QuickSight APIs 1661 Amazon QuickSight User Guide Running these commands sets the role session ID of the user visiting your website to embedding_quicksight_console_session_role/[email protected]. The role session ID is made up of the role name from role-arn and the role-session-name value. Using the unique role session ID for each user ensures that appropriate permissions are set for each user. It also prevents any throttling of user access. Throttling is a security feature that prevents the same user from accessing QuickSight from multiple locations. The role session ID also becomes the user name in QuickSight. You can use this pattern to provision your users in QuickSight ahead of time, or to provision them the first time they access a console session. The following example shows the CLI command that you can use to provision a user. For more information about RegisterUser, DescribeUser, and other QuickSight API operations, see the QuickSight API reference. aws quicksight register-user \ --aws-account-id 111122223333 \ --namespace default \ --identity-type IAM \ --iam-arn "arn:aws:iam::111122223333:role/embedding_quicksight_dashboard_role" \ --user-role READER \ --user-name jhnd \ --session-name "[email protected]" \ --email [email protected] \ --region us-east-1 \ --custom-permissions-name TeamA1 If the user is authenticated through Microsoft AD, you don't need to use RegisterUser to set them up. Instead, they should be automatically subscribed the first time they access QuickSight. For Microsoft AD users, you can use DescribeUser to get the user ARN. The first time a user accesses QuickSight, you can also add this user to the appropriate group. The following example shows the CLI command to add a user to a group. aws quicksight create-group-membership \ --aws-account-id=111122223333 \ --namespace=default \ --group-name=financeusers \ --member-name="embedding_quicksight_dashboard_role/[email protected]" Embedding with the QuickSight APIs 1662 Amazon QuickSight User Guide You now have a user of your app who is also a user of QuickSight, and who has access to the QuickSight console session. Finally, to get a signed URL for the console session, call get-session-embed-url from the app server. This returns the embeddable console session URL. The following example shows how to get the URL for an embedded console session using a server-side call for users authenticated through AWS Managed Microsoft AD or Single Sign-on (IAM Identity Center). aws quicksight get-dashboard-embed-url \ --aws-account-id 111122223333 \ --entry-point the-url-for--the-console-session \ --session-lifetime-in-minutes 600 \ --user-arn arn:aws:quicksight:us-east-1:111122223333:user/ default/embedding_quicksight_dashboard_role/embeddingsession For more information on using this operation, see |
amazon-quicksight-user-452 | amazon-quicksight-user.pdf | 452 | a user of your app who is also a user of QuickSight, and who has access to the QuickSight console session. Finally, to get a signed URL for the console session, call get-session-embed-url from the app server. This returns the embeddable console session URL. The following example shows how to get the URL for an embedded console session using a server-side call for users authenticated through AWS Managed Microsoft AD or Single Sign-on (IAM Identity Center). aws quicksight get-dashboard-embed-url \ --aws-account-id 111122223333 \ --entry-point the-url-for--the-console-session \ --session-lifetime-in-minutes 600 \ --user-arn arn:aws:quicksight:us-east-1:111122223333:user/ default/embedding_quicksight_dashboard_role/embeddingsession For more information on using this operation, see GetSessionEmbedUrl. You can use this and other API operations in your own code. Step 3: Embed the console session URL Important Amazon QuickSight has new APIs for embedding analytics: GenerateEmbedUrlForAnonymousUser and GenerateEmbedUrlForRegisteredUser. You can still use the GetDashboardEmbedUrl and GetSessionEmbedUrl APIs to embed dashboards and the QuickSight console, but they do not contain the latest embedding capabilities. For the latest up-to-date embedding experience, see Embedding QuickSight analytics into your applications. In the following section, you can find out how you can use the Amazon QuickSight embedding SDK (JavaScript) to embed the console session URL from step 3 in your website or application page. With the SDK, you can do the following: • Place the console session on an HTML page. • Pass parameters into the console session. • Handle error states with messages that are customized to your application. Embedding with the QuickSight APIs 1663 Amazon QuickSight User Guide Call the GetSessionEmbedUrl API operation to get the URL that you can embed in your app. This URL is valid for 5 minutes, and the resulting session is valid for 10 hours. The API operation provides the URL with an auth_code that enables a single-sign on session. The following shows an example response from get-dashboard-embed-url. //The URL returned is over 900 characters. For this example, we've shortened the string for //readability and added ellipsis to indicate that it's incomplete. { "Status": "200", "EmbedUrl": "https: //dashboards.example.com/ embed/620bef10822743fab329fb3751187d2d...", "RequestId": "7bee030e-f191-45c4-97fe-d9faf0e03713" } Embed this console session in your webpage by using the QuickSight Embedding SDK or by adding this URL into an iframe. If you set a fixed height and width number (in pixels), QuickSight uses those and doesn't change your visual as your window resizes. If you set a relative percent height and width, QuickSight provides a responsive layout that is modified as your window size changes. By using the Amazon QuickSight Embedding SDK, you can also control parameters within the console session and receive callbacks in terms of page load completion and errors. The following example shows how to use the generated URL. This code is generated on your app server. <!DOCTYPE html> <html> <head> <title>Basic Embed</title> <script src="./quicksight-embedding-js-sdk.min.js"></script> <script type="text/javascript"> var dashboard; function embedDashboard() { var containerDiv = document.getElementById("embeddingContainer"); var options = { // replace this dummy url with the one generated via embedding API url: "https://us-east-1.quicksight.aws.amazon.com/sn/dashboards/ dashboardId?isauthcode=true&identityprovider=quicksight&code=authcode", Embedding with the QuickSight APIs 1664 Amazon QuickSight User Guide container: containerDiv, scrolling: "no", height: "700px", width: "1000px", footerPaddingEnabled: true }; dashboard = QuickSightEmbedding.embedDashboard(options); } </script> </head> <body onload="embedDashboard()"> <div id="embeddingContainer"></div> </body> </html> For this example to work, make sure to use the Amazon QuickSight Embedding SDK to load the embedded console session on your website using JavaScript. To get your copy, do one of the following: • Download the Amazon QuickSight embedding SDK from GitHub. This repository is maintained by a group of QuickSight developers. • Download the latest embedding SDK version from https://www.npmjs.com/package/amazon- quicksight-embedding-sdk. • If you use npm for JavaScript dependencies, download and install it by running the following command. npm install amazon-quicksight-embedding-sdk Embedding with the QuickSight APIs 1665 Amazon QuickSight User Guide Troubleshooting Amazon QuickSight Use this information to help you diagnose and fix common issues that you can encounter when using Amazon QuickSight. Note Need more help? You can visit the Amazon QuickSight User Community or the AWS forums. See also the Amazon QuickSight Resource Library. Topics • Resolving Amazon QuickSight issues and error messages • Connectivity issues when using Amazon Athena with Amazon QuickSight • Data source connectivity issues for Amazon QuickSight • Login issues with Amazon QuickSight • Visual issues with Amazon QuickSight Resolving Amazon QuickSight issues and error messages If you are having difficulties or receiving an error message, there's a few ways that you can go about resolving the issue. Following are some resources that can help: • For errors during dataset ingestion (importing data), see SPICE ingestion error codes. • For technical user questions, visit the User Community. • For administrator questions, see the AWS forums. • If you need more customized assistance, contact AWS Support. To do this while you are signed in to your AWS account, choose Support at upper right, and then choose Support Center. Connectivity issues when using Amazon |
amazon-quicksight-user-453 | amazon-quicksight-user.pdf | 453 | issues and error messages If you are having difficulties or receiving an error message, there's a few ways that you can go about resolving the issue. Following are some resources that can help: • For errors during dataset ingestion (importing data), see SPICE ingestion error codes. • For technical user questions, visit the User Community. • For administrator questions, see the AWS forums. • If you need more customized assistance, contact AWS Support. To do this while you are signed in to your AWS account, choose Support at upper right, and then choose Support Center. Connectivity issues when using Amazon Athena with Amazon QuickSight Following, you can find information about troubleshooting issues that you might encounter when using Amazon Athena with Amazon QuickSight. Resolving Amazon QuickSight issues and error messages 1666 Amazon QuickSight User Guide Before you try troubleshooting anything else for Athena, make sure that you can connect to Athena. For information about troubleshooting Athena connection issues, see I can't connect to Amazon Athena. If you can connect but have other issues, it can be useful to run your query in the Athena console (https://console.aws.amazon.com/athena/) before adding your query to Amazon QuickSight. For additional troubleshooting information, see Troubleshooting in the Athena User Guide. Topics • Column not found when using Athena with Amazon QuickSight • Invalid data when using Athena with Amazon QuickSight • Query timeout when using Athena with Amazon QuickSight • Staging bucket no longer exists when using Athena with Amazon QuickSight • Table incompatible when using AWS Glue with Athena in Amazon QuickSight • Table not found when using Athena with Amazon QuickSight • Workgroup and output errors when using Athena with Amazon QuickSight Column not found when using Athena with Amazon QuickSight You can receive a "column not found" error if the columns in an analysis are missing from the Athena data source. In Amazon QuickSight, open your analysis. On the Visualize tab, choose Choose dataset, Edit analysis data sets. On the Data sets in this analysis screen, choose Edit near your dataset to refresh the dataset. Amazon QuickSight caches the schema for two minutes. So it can take two minutes before the latest changes display. To investigate how the column was lost in the first place, you can go to the Athena console (https://console.aws.amazon.com/athena/) and check the query history to find queries that edited the table. If this error happened when you were editing a custom SQL query in preview, verify that the name of the column in the query, and check for any other syntax errors. For example, check that the column name isn't enclosed in single quotation marks, which are reserved for strings. Athena column not found 1667 Amazon QuickSight User Guide If you still have the issue, verify that your tables, columns, and queries comply with Athena requirements. For more information, see Names for Tables, Databases, and Columns and Troubleshooting in the Athena User Guide. Invalid data when using Athena with Amazon QuickSight An invalid data error can occur when you use any operator or function in a calculated field. To address this, verify that the data in the table is consistent with the format that you supplied to the function. For example, suppose that you are using the function parseDate(expression, [‘format’], [‘time_zone’]) as parseDate(date_column, ‘MM/dd/yyyy’). In this case, all values in date_column must conform to 'MM/dd/yyyy' format (’05/12/2016’). Any value that isn't in this format (‘2016/12/05’) can cause an error. Query timeout when using Athena with Amazon QuickSight If your query times out, you can try these options to resolve your problem. If the failure was generated while working on an analysis, remember that the Amazon QuickSight timeout for generating any visual is two minutes. If you're using a custom SQL query, you can simplify your query to optimize running time. If you are in direct query mode (not using SPICE), you can try importing your data to SPICE. However, if your query exceeds the Athena 30-minute timeout, you might get another timeout while importing data into SPICE. For the most current information on Athena limits, see Amazon Athena Limits in the AWS General Reference. Staging bucket no longer exists when using Athena with Amazon QuickSight Use this section to help solve this error: "The staging bucket for this query result no longer exists in the underlying data source." When you create a dataset using Athena, Amazon QuickSight creates an Amazon S3 bucket. By default, this bucket has a name similar to "aws-athena-query- results-<REGION>-<ACCOUNTID>". If you remove this bucket, then your next Athena query might fail with an error saying the staging bucket no longer exists. To fix this error, create a new bucket with the same name in the correct AWS Region. Athena invalid data 1668 Amazon QuickSight User Guide Table incompatible when using AWS Glue with Athena in |
amazon-quicksight-user-454 | amazon-quicksight-user.pdf | 454 | help solve this error: "The staging bucket for this query result no longer exists in the underlying data source." When you create a dataset using Athena, Amazon QuickSight creates an Amazon S3 bucket. By default, this bucket has a name similar to "aws-athena-query- results-<REGION>-<ACCOUNTID>". If you remove this bucket, then your next Athena query might fail with an error saying the staging bucket no longer exists. To fix this error, create a new bucket with the same name in the correct AWS Region. Athena invalid data 1668 Amazon QuickSight User Guide Table incompatible when using AWS Glue with Athena in Amazon QuickSight If you are getting errors when using AWS Glue tables in Athena with Amazon QuickSight, it might be because you're missing some metadata. Follow these steps to find out if your tables don't have the TableType attribute that Amazon QuickSight needs for the Athena connector to work. Usually, the metadata for these tables wasn't migrated to the AWS Glue Data Catalog. For more information, see Upgrading to the AWS Glue Data Catalog Step-by-Step in the AWS Glue Developer Guide. If you don't want to migrate to the AWS Glue Data Catalog at this time, you have two options. You can recreate each AWS Glue table through the AWS Glue Management Console. Or you can use the AWS CLI scripts listed in the following procedure to identify and update tables with missing TableType attributes. If you prefer to use the CLI to do this, use the following procedure to help you design your scripts. To use the CLI to design scripts 1. Use the CLI to learn which AWS Glue tables have no TableType attributes. aws glue get-tables --database-name <your_datebase_name>; For example, you can run the following command in the CLI. aws glue get-table --database-name "test_database" --name "table_missing_table_type" Following is a sample of what the output looks like. You can see that the table "table_missing_table_type" doesn't have the TableType attribute declared. { "TableList": [ { "Retention": 0, "UpdateTime": 1522368588.0, "PartitionKeys": [ { "Name": "year", "Type": "string" AWS Glue table incompatible with Athena 1669 User Guide Amazon QuickSight }, { "Name": "month", "Type": "string" }, { "Name": "day", "Type": "string" } ], "LastAccessTime": 1513804142.0, "Owner": "owner", "Name": "table_missing_table_type", "Parameters": { "delimiter": ",", "compressionType": "none", "skip.header.line.count": "1", "sizeKey": "75", "averageRecordSize": "7", "classification": "csv", "objectCount": "1", "typeOfData": "file", "CrawlerSchemaDeserializerVersion": "1.0", "CrawlerSchemaSerializerVersion": "1.0", "UPDATED_BY_CRAWLER": "crawl_date_table", "recordCount": "9", "columnsOrdered": "true" }, "StorageDescriptor": { "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", "SortColumns": [], "StoredAsSubDirectories": false, "Columns": [ { "Name": "col1", "Type": "string" }, { "Name": "col2", "Type": "bigint" } ], "Location": "s3://myAthenatest/test_dataset/", "NumberOfBuckets": -1, AWS Glue table incompatible with Athena 1670 Amazon QuickSight User Guide "Parameters": { "delimiter": ",", "compressionType": "none", "skip.header.line.count": "1", "columnsOrdered": "true", "sizeKey": "75", "averageRecordSize": "7", "classification": "csv", "objectCount": "1", "typeOfData": "file", "CrawlerSchemaDeserializerVersion": "1.0", "CrawlerSchemaSerializerVersion": "1.0", "UPDATED_BY_CRAWLER": "crawl_date_table", "recordCount": "9" }, "Compressed": false, "BucketColumns": [], "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", "SerdeInfo": { "Parameters": { "field.delim": "," }, "SerializationLibrary": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe" } } } ] } 2. Edit the table definition in your editor to add "TableType": "EXTERNAL_TABLE" to the table definition, as shown in the following example. { "Table": { "Retention": 0, "TableType": "EXTERNAL_TABLE", "PartitionKeys": [ { "Name": "year", "Type": "string" }, { "Name": "month", AWS Glue table incompatible with Athena 1671 Amazon QuickSight User Guide "Type": "string" }, { "Name": "day", "Type": "string" } ], "UpdateTime": 1522368588.0, "Name": "table_missing_table_type", "StorageDescriptor": { "BucketColumns": [], "SortColumns": [], "StoredAsSubDirectories": false, "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", "SerdeInfo": { "SerializationLibrary": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe", "Parameters": { "field.delim": "," } }, "Parameters": { "classification": "csv", "CrawlerSchemaSerializerVersion": "1.0", "UPDATED_BY_CRAWLER": "crawl_date_table", "columnsOrdered": "true", "averageRecordSize": "7", "objectCount": "1", "sizeKey": "75", "delimiter": ",", "compressionType": "none", "recordCount": "9", "CrawlerSchemaDeserializerVersion": "1.0", "typeOfData": "file", "skip.header.line.count": "1" }, "Columns": [ { "Name": "col1", "Type": "string" }, { "Name": "col2", "Type": "bigint" } AWS Glue table incompatible with Athena 1672 Amazon QuickSight ], "Compressed": false, "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", "NumberOfBuckets": -1, "Location": "s3://myAthenatest/test_date_part/" User Guide }, "Owner": "owner", "Parameters": { "classification": "csv", "CrawlerSchemaSerializerVersion": "1.0", "UPDATED_BY_CRAWLER": "crawl_date_table", "columnsOrdered": "true", "averageRecordSize": "7", "objectCount": "1", "sizeKey": "75", "delimiter": ",", "compressionType": "none", "recordCount": "9", "CrawlerSchemaDeserializerVersion": "1.0", "typeOfData": "file", "skip.header.line.count": "1" }, "LastAccessTime": 1513804142.0 } } 3. You can adapt the following script to update the table input, so that it includes the TableType attribute. aws glue update-table --database-name <your_datebase_name> --table-input <updated_table_input> The following shows an example. aws glue update-table --database-name test_database --table-input ' { "Retention": 0, "TableType": "EXTERNAL_TABLE", "PartitionKeys": [ { "Name": "year", "Type": "string" }, AWS Glue table incompatible with Athena 1673 User Guide Amazon QuickSight { "Name": "month", "Type": "string" }, { "Name": "day", "Type": "string" } ], "Name": "table_missing_table_type", "StorageDescriptor": { "BucketColumns": [], "SortColumns": [], "StoredAsSubDirectories": false, "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", "SerdeInfo": { "SerializationLibrary": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe", "Parameters": { "field.delim": "," } }, "Parameters": { "classification": "csv", "CrawlerSchemaSerializerVersion": "1.0", "UPDATED_BY_CRAWLER": "crawl_date_table", "columnsOrdered": "true", "averageRecordSize": "7", "objectCount": "1", "sizeKey": "75", "delimiter": ",", "compressionType": "none", "recordCount": "9", "CrawlerSchemaDeserializerVersion": "1.0", "typeOfData": "file", "skip.header.line.count": "1" }, "Columns": [ { "Name": "col1", "Type": |
amazon-quicksight-user-455 | amazon-quicksight-user.pdf | 455 | glue update-table --database-name test_database --table-input ' { "Retention": 0, "TableType": "EXTERNAL_TABLE", "PartitionKeys": [ { "Name": "year", "Type": "string" }, AWS Glue table incompatible with Athena 1673 User Guide Amazon QuickSight { "Name": "month", "Type": "string" }, { "Name": "day", "Type": "string" } ], "Name": "table_missing_table_type", "StorageDescriptor": { "BucketColumns": [], "SortColumns": [], "StoredAsSubDirectories": false, "OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat", "SerdeInfo": { "SerializationLibrary": "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe", "Parameters": { "field.delim": "," } }, "Parameters": { "classification": "csv", "CrawlerSchemaSerializerVersion": "1.0", "UPDATED_BY_CRAWLER": "crawl_date_table", "columnsOrdered": "true", "averageRecordSize": "7", "objectCount": "1", "sizeKey": "75", "delimiter": ",", "compressionType": "none", "recordCount": "9", "CrawlerSchemaDeserializerVersion": "1.0", "typeOfData": "file", "skip.header.line.count": "1" }, "Columns": [ { "Name": "col1", "Type": "string" }, { "Name": "col2", "Type": "bigint" AWS Glue table incompatible with Athena 1674 Amazon QuickSight } ], "Compressed": false, "InputFormat": "org.apache.hadoop.mapred.TextInputFormat", "NumberOfBuckets": -1, "Location": "s3://myAthenatest/test_date_part/" User Guide }, "Owner": "owner", "Parameters": { "classification": "csv", "CrawlerSchemaSerializerVersion": "1.0", "UPDATED_BY_CRAWLER": "crawl_date_table", "columnsOrdered": "true", "averageRecordSize": "7", "objectCount": "1", "sizeKey": "75", "delimiter": ",", "compressionType": "none", "recordCount": "9", "CrawlerSchemaDeserializerVersion": "1.0", "typeOfData": "file", "skip.header.line.count": "1" }, "LastAccessTime": 1513804142.0 }' Table not found when using Athena with Amazon QuickSight You can receive a "table not found" error if the tables in an analysis are missing from the Athena data source. In the Athena console (https://console.aws.amazon.com/athena/), check for your table under the corresponding schema. You can recreate the table in Athena and then create a new dataset in Amazon QuickSight on that table. To investigate how the table was lost in the first place, you can use the Athena console to check the query history. Doing this helps you find the queries that dropped the table. If this error happened when you were editing a custom SQL query in preview, verify that the name of the table in the query, and check for any other syntax errors. Amazon QuickSight can't infer the schema from the query. The schema must be specified in the query. Athena Table not found 1675 Amazon QuickSight User Guide For example, the following statement works. select from my_schema.my_table The following statement fails because it's missing the schema. select from my_table If you still have the issue, verify that your tables, columns, and queries comply with Athena requirements. For more information, see Names for Tables, Databases, and Columns and Troubleshooting in the Athena User Guide. Workgroup and output errors when using Athena with Amazon QuickSight To verify that workgroups are set up properly, check the following settings: • The Athena workgroup that's associated with the data source must exist. To fix this, you can return to the Athena data source settings and choose a different workgroup. For more information, see Setting Up Workgroups in the Athena User Guide. Another solution is to have the AWS account administrator recreate the workgroup in the Athena console. • The Athena workgroup that's associated with the data source must be enabled. An AWS account administrator needs to enable the workgroup in the Athena console. Open the Athena console by using this direct link: https://console.aws.amazon.com/athena/. Then choose the appropriate workgroup in the Workgroup panel and view its settings. Choose Enable workgroup. • Make sure that you have access to the Amazon S3 output location that's associated with the Athena workgroup. To grant Amazon QuickSight permissions to access the S3 output location, the Amazon QuickSight administrator can edit Security & Permissions in the Manage QuickSight screen. • The Athena workgroup must have an associated S3 output location. An AWS account administrator needs to associate an S3 bucket with the workgroup in the Athena console. Open the Athena console by using this direct link: https:// Workgroup and output errors when using Athena with Amazon QuickSight 1676 Amazon QuickSight User Guide console.aws.amazon.com/athena/. Then choose the appropriate workgroup in the Workgroup panel and view its settings. Set Query result location. Data source connectivity issues for Amazon QuickSight Use the following section to help you troubleshoot connections to data sources. Before you continue, verify that your database is currently available. Also, verify that you have the correct connection information and valid credentials. Topics • I can't connect although my data source connection options look right (SSL) • I can't connect to Amazon Athena • I can't connect to Amazon S3 • I can't create or refresh a dataset from an existing Adobe Analytics data source • I need to validate the connection to my data source, or change data source settings • I can't connect to MySQL (issues with SSL and authorization) • I can't connect to RDS I can't connect although my data source connection options look right (SSL) Problems connecting can occur when Secure Sockets Layer (SSL) is incorrectly configured. The symptoms can include the following: • You can connect to your database in other ways or from other locations but not in this case. • You can connect to a similar database but not this one. Before continuing, rule out the following |
amazon-quicksight-user-456 | amazon-quicksight-user.pdf | 456 | • I need to validate the connection to my data source, or change data source settings • I can't connect to MySQL (issues with SSL and authorization) • I can't connect to RDS I can't connect although my data source connection options look right (SSL) Problems connecting can occur when Secure Sockets Layer (SSL) is incorrectly configured. The symptoms can include the following: • You can connect to your database in other ways or from other locations but not in this case. • You can connect to a similar database but not this one. Before continuing, rule out the following circumstances: • Permissions issues • Availability issues • An expired or invalid certificate • A self-signed certificate • Certificate chain in the wrong order Data source connectivity issues 1677 Amazon QuickSight • Ports not enabled • Firewall blocking an IP address • Web Sockets are blocked User Guide • A virtual private cloud (VPC) or security group not configured correctly. To help find issues with SSL, you can use an online SSL checker, or a tool like OpenSSL. The following steps walk through troubleshooting a connection where SSL is suspect. The administrator in this example has already installed OpenSSL. Example 1. The user finds an issue connecting to the database. The user verifies that they can connect a different database in another AWS Region. They check other versions of the same database and can connect easily. 2. The administrator reviews the issue and decides to verify that the certificates are working correctly. The administrator searches online for an article on using OpenSSL to troubleshoot or debug SSL connections. 3. Using OpenSSL, the administrator verifies the SSL configuration in the terminal. echo quit openssl s_client –connect <host>:port The result shows that the certificate is not working. ... ... ... CONNECTED(00000003) 012345678901234:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:782: --- no peer certificate available --- No client certificate CA names sent --- I can't connect although my data source connection options look right (SSL) 1678 Amazon QuickSight User Guide SSL handshake has read 7 bytes and written 278 bytes --- New, (NONE), Cipher is (NONE) Secure Renegotiation IS NOT supported SSL-Session: Protocol : TLSv1.2 Cipher : 0000 Session-ID: Session-ID-ctx: Master-Key: Key-Arg : None PSK identity: None PSK identity hint: None Start Time: 1497569068 Timeout : 300 (sec) Verify return code: 0 (ok) --- 4. The administrator corrects the problem by installing the SSL certificate on the user's database server. For more detail on the solution in this example, see Using SSL to Encrypt a Connection to a DB Instance in the Amazon RDS User Guide. I can't connect to Amazon Athena Intended audience: Amazon QuickSight administrators Use this section to help troubleshoot connecting to Athena. If you can't connect to Amazon Athena, you might get an insufficient permissions error when you run a query, showing that the permissions aren't configured. To verify that you can connect Amazon QuickSight to Athena, check the following settings: • AWS resource permissions inside of Amazon QuickSight • AWS Identity and Access Management (IAM) policies • Amazon S3 location • Query results location I can't connect to Amazon Athena 1679 Amazon QuickSight User Guide • AWS KMS key policy (for encrypted datasets only) For details, see following. For information about troubleshooting other Athena issues, see Connectivity issues when using Amazon Athena with Amazon QuickSight. Make sure that you authorized Amazon QuickSight to use Athena Intended audience: Amazon QuickSight administrators Use the following procedure to make sure that you successfully authorized Amazon QuickSight to use Athena. Permissions to AWS resources apply to all Amazon QuickSight users. To perform this action, you must be an Amazon QuickSight administrator. To check if you have access, verify that you see the Manage QuickSight option when you open the menu from your profile at upper right. To authorize Amazon QuickSight to access Athena 1. Choose your profile name (upper right). Choose Manage QuickSight, and then choose Security & permissions. 2. Under QuickSight access to AWS services, choose Add or remove. 3. Find Athena in the list. Clear the box by Athena, then select it again to enable Athena. Then choose Connect both. 4. Choose the buckets that you want to access from Amazon QuickSight. The settings for S3 buckets that you access here are the same ones that you access by choosing Amazon S3 from the list of AWS services. Be careful that you don't inadvertently disable a bucket that someone else uses. 5. Choose Finish to confirm your selection. Or choose Cancel to exit without saving. 6. Choose Update to save your new settings for Amazon QuickSight access to AWS services. Or choose Cancel to exit without making any changes. 7. Make sure that you are using the correct AWS Region when you are finished. If you had to change your AWS Region as part of |
amazon-quicksight-user-457 | amazon-quicksight-user.pdf | 457 | S3 buckets that you access here are the same ones that you access by choosing Amazon S3 from the list of AWS services. Be careful that you don't inadvertently disable a bucket that someone else uses. 5. Choose Finish to confirm your selection. Or choose Cancel to exit without saving. 6. Choose Update to save your new settings for Amazon QuickSight access to AWS services. Or choose Cancel to exit without making any changes. 7. Make sure that you are using the correct AWS Region when you are finished. If you had to change your AWS Region as part of the first step of this process, change it back to the AWS Region that you were using before. I can't connect to Amazon Athena 1680 Amazon QuickSight User Guide Make sure that your IAM policies grant the right permissions Intended audience: System administrators Your AWS Identity and Access Management (IAM) policies must grant permissions to specific actions. Your IAM user or role must be able to read and write both the input and the output of the S3 buckets that Athena uses for your query. If the dataset is encrypted, the IAM user needs to be a key user in the specified AWS KMS key's policy. To verify that your IAM policies have permission to use S3 buckets for your query 1. Open the IAM console at https://console.aws.amazon.com/iam/. 2. Locate the IAM user or role that you are using. Choose the user or role name to see the associated policies. 3. Verify that your policy has the correct permissions. Choose a policy that you want to verify, and then choose Edit policy. Use the visual editor, which opens by default. If you have the JSON editor open instead, choose the Visual editor tab. 4. Choose the S3 entry in the list to see its contents. The policy needs to grant permissions to list, read, and write. If S3 is not in the list, or it doesn't have the correct permissions, you can add them here. For examples of IAM policies that work with Amazon QuickSight, see IAM policy examples for Amazon QuickSight. Make sure that the IAM user has read/write access to your S3 location Intended audience: Amazon QuickSight administrators To access Athena data from Amazon QuickSight, first make sure that Athena and its S3 location are authorized in Manage QuickSight screen. For more information, see Make sure that you authorized Amazon QuickSight to use Athena. Next, verify the relevant IAM permissions. The IAM user for your Athena connection needs read/ write access to the location where your results go in S3. Start by verifying that the IAM user has I can't connect to Amazon Athena 1681 Amazon QuickSight User Guide an attached policy that allows access to Athena, such as AmazonAthenaFullAccess. Let Athena create the bucket using the name that it requires, and then add this bucket to the list of buckets that QuickSight can access. If you change the default location of the results bucket (aws-athena- query-results-*), be sure that the IAM user has permission to read and write to the new location. Verify that you don't include the AWS Region code in the S3 URL. For example, use s3:// awsexamplebucket/path and not s3://us-east-1.amazonaws.com/awsexamplebucket/ path. Using the wrong S3 URL causes an Access Denied error. Also verify that the bucket policies and object access control lists (ACLs) allow the IAM user to access the objects in the buckets. If the IAM user is in a different AWS account, see Cross-account Access in the Amazon Athena User Guide. If the dataset is encrypted, verify that the IAM user is a key user in the specified AWS KMS key's policy. You can do this in the AWS KMS console at https://console.aws.amazon.com/kms. To set permissions to your Athena query results location 1. Open the Athena console at https://console.aws.amazon.com/athena/. 2. Verify that you have selected the workgroup you want to use: • Examine the Workgroup option at the top. It has the format Workgroup: group-name. If the group name is the one that you want to use, skip to the next step. • To choose a different workgroup, chose Workgroup at the top. Choose the workgroup that you want to use, and choose Switch workgroup. 3. Choose Settings at upper right. (Not common) If you get an error that your workgroup is not found, use these steps to fix it: a. Ignore the error message for now, and instead find Workgroup: group-name on the Settings page. Your workgroup's name is a hyperlink. Open it. b. On the Workgroup: <groupname> page, choose Edit workgroup at left. Now close the error message. c. Near Query result location, open the S3 location selector by choosing the Select button that has the file folder icon. d. Choose the small arrow at the end of the name |
amazon-quicksight-user-458 | amazon-quicksight-user.pdf | 458 | choose Switch workgroup. 3. Choose Settings at upper right. (Not common) If you get an error that your workgroup is not found, use these steps to fix it: a. Ignore the error message for now, and instead find Workgroup: group-name on the Settings page. Your workgroup's name is a hyperlink. Open it. b. On the Workgroup: <groupname> page, choose Edit workgroup at left. Now close the error message. c. Near Query result location, open the S3 location selector by choosing the Select button that has the file folder icon. d. Choose the small arrow at the end of the name of the S3 location for Athena. The name must begin with aws-athena-query-results. I can't connect to Amazon Athena 1682 Amazon QuickSight User Guide e. f. g. (Optional) Encrypt query results by selecting the Encrypt results stored in S3 check box. Choose Save to confirm your choices. If the error doesn't reappear, return to Settings. Occasionally, the error might appear again. If so, take the following steps: 1. Choose the workgroup and then choose View details. 2. (Optional) To preserve your settings, take notes or a screenshot of the workgroup configuration. 3. Choose Create workgroup. 4. Replace the workgroup with a new one. Configure the correct S3 location and encryption options. Note the S3 location because you need it later. 5. Choose Save to proceed. 6. When you no longer need the original workgroup, disable it. Make sure to carefully read the warning that appears, because it tells you what you lose if you choose to disable it. 4. If you didn't get this by troubleshooting in the previous step, choose Settings at upper right and get the S3 location value shown as Query result location. 5. If Encrypt query results is enabled, check whether it uses SSE-KMS or CSE-KMS. Note the key. 6. Open the S3 console at https://console.aws.amazon.com/s3/, open the correct bucket, and then choose the Permissions tab. 7. Check that your IAM user has access by viewing Bucket Policy. If you manage access with ACLs, make sure that the access control lists (ACLs) are set up by viewing Access Control List. 8. If your dataset is encrypted (Encrypt query results is selected in the workgroup settings), make sure that the IAM user or role is added as a key user in that AWS KMS key's policy. You can access AWS KMS settings at https://console.aws.amazon.com/kms. To grant access to the S3 bucket used by Athena 1. Open the Amazon S3 console at https://console.aws.amazon.com/s3/. 2. Choose the S3 bucket used by Athena in the Query result location. 3. On the Permissions tab, verify the permissions. I can't connect to Amazon Athena 1683 Amazon QuickSight User Guide For more information, see the AWS Support article When I run an Athena query, I get an "Access Denied" error. I can't connect to Amazon S3 To successfully connect to Amazon S3, make sure that you configure authentication and create a valid manifest file inside the bucket you are trying to access. Also, make sure that the file described by the manifest is available. To verify authentication, make sure that you authorized Amazon QuickSight to access the S3 account. It's not enough that you, the user, are authorized. Amazon QuickSight must be authorized separately. To authorize Amazon QuickSight to access your Amazon S3 bucket 1. In the AWS Region list at upper right, choose the US East (N. Virginia) Region. You use this AWS Region temporarily while you edit your account permissions. 2. Inside Amazon QuickSight, choose your profile name (upper right). Choose Manage QuickSight, and then choose Security & permissions. 3. Choose Add or remove. 4. Locate Amazon S3 in the list. Choose one of the following actions to open the screen where you can choose S3 buckets: • If the check box is clear, select the check box next to Amazon S3. • If the check box is selected, choose Details, and then choose Select S3 buckets. 5. Choose the buckets that you want to access from Amazon QuickSight. Then choose Select. 6. Choose Update. 7. If you changed your AWS Region during the first step of this process, change it back to the AWS Region that you want to use. We strongly recommend that you make sure that your manifest file is valid. If Amazon QuickSight can't parse your file, it gives you an error message. That might be something like "We can't parse the manifest file as valid JSON" or "We can't connect to the S3 bucket." I can't connect to Amazon S3 1684 Amazon QuickSight To verify your manifest file User Guide 1. Open your manifest file. You can do this directly from the Amazon S3 console at https:// console.aws.amazon.com/s3/. Go to your manifest file and choose Open. 2. Make sure that the URI or URLs provided inside the |
amazon-quicksight-user-459 | amazon-quicksight-user.pdf | 459 | strongly recommend that you make sure that your manifest file is valid. If Amazon QuickSight can't parse your file, it gives you an error message. That might be something like "We can't parse the manifest file as valid JSON" or "We can't connect to the S3 bucket." I can't connect to Amazon S3 1684 Amazon QuickSight To verify your manifest file User Guide 1. Open your manifest file. You can do this directly from the Amazon S3 console at https:// console.aws.amazon.com/s3/. Go to your manifest file and choose Open. 2. Make sure that the URI or URLs provided inside the manifest file indicate the file or files that you want connect to. 3. Make sure that your manifest file is formed correctly, if you use a link to the manifest file rather than uploading the file. The link shouldn't have any additional phrases after the word .json. You can get the correct link to an S3 file by viewing its Link value in the details on the S3 console. 4. Make sure that the content of the manifest file is valid by using a JSON validator, like the one at https://jsonlint.com. 5. Verify permissions on your bucket or file. In the https://console.aws.amazon.com/s3/, navigate to your Amazon S3 bucket, choose the Permissions tab, and add the appropriate permissions. Make sure that the permissions are at the right level, either on the bucket or on the file or files. 6. If you are using the s3:// protocol, rather than https://, make sure that you reference your bucket directly. For example, use s3://awsexamplebucket/myfile.csv instead of s3:// s3-us-west-2.amazonaws.com/awsexamplebucket/myfile.csv. Doubly specifying Amazon S3, by using s3:// and also s3-us-west-2.amazonaws.com, causes an error. For more information about manifest files and connecting to Amazon S3, see Supported formats for Amazon S3 manifest files. In addition, verify that your Amazon S3 dataset was created according to the steps in Creating a dataset using Amazon S3 files. If you use Athena to connect to Amazon S3, see I can't connect to Amazon Athena. I can't create or refresh a dataset from an existing Adobe Analytics data source As of May 1, 2022, Amazon QuickSight no longer supports legacy OAuth and version 1.3 and SOAP API operations in Adobe Analytics. If you experience failures while trying to create or refresh a dataset from an existing Adobe Analytics data source, you might have a stale access token. I can't create or refresh a dataset from an existing Adobe Analytics data source 1685 Amazon QuickSight User Guide To troubleshoot failures while creating or refreshing a dataset from an existing Adobe Analytics data source 1. Open QuickSight and choose Datasets. 2. Choose New dataset. 3. On the Create a dataset page, scroll down to the FROM EXISTING DATASOURCES section, and then choose the Adobe Analytics data source that you want to update. 4. Choose Edit data source. 5. On the Edit Adobe Analytics data source page that opens, choose Update data source to reauthorize the Adobe Analytics connection. 6. Try recreating or refreshing the dataset again. The dataset creation or refresh should succeed. I need to validate the connection to my data source, or change data source settings In some cases, you might need to update your data source, or you got a connection error and need to check your settings. If so, take the following steps. To validate your connection to the data source 1. From the QuickSight home screen, choose Manage data. 2. Choose New dataset. 3. Scroll to FROM EXISTING DATA SOURCES. 4. Choose the data source that you want to test or change. 5. If the option is offered, choose Edit/Preview data. 6. Choose Validate connection. 7. Make any changes that you want to make, then choose Update data source. I can't connect to MySQL (issues with SSL and authorization) To check on some common connection issues in MySQL, use the following steps. This procedure helps you find out if you have enabled SSL and granted usage rights. I need to validate the connection to my data source, or change data source settings 1686 Amazon QuickSight User Guide To find solutions for some common connection issues in MySQL 1. Check /etc/my.cnf to make sure SSL is enabled for MySQL. 2. In MySQL, run the following command. show status like 'Ssl%'; If SSL is working, you see results like the following. +--------------------------------+----------------------+ | Variable_name | Value | +--------------------------------+----------------------+ | Ssl_accept_renegotiates | 0 | | Ssl_accepts | 1 | | Ssl_callback_cache_hits | 0 | | Ssl_cipher | | | Ssl_cipher_list | | | Ssl_client_connects | 0 | | Ssl_connect_renegotiates | 0 | | Ssl_ctx_verify_depth | 18446744073709551615 | | Ssl_ctx_verify_mode | 5 | | Ssl_default_timeout | 0 | | Ssl_finished_accepts | 0 | | Ssl_finished_connects | 0 | | Ssl_session_cache_hits | 0 | | Ssl_session_cache_misses | 0 | | Ssl_session_cache_mode | SERVER |
amazon-quicksight-user-460 | amazon-quicksight-user.pdf | 460 | 2. In MySQL, run the following command. show status like 'Ssl%'; If SSL is working, you see results like the following. +--------------------------------+----------------------+ | Variable_name | Value | +--------------------------------+----------------------+ | Ssl_accept_renegotiates | 0 | | Ssl_accepts | 1 | | Ssl_callback_cache_hits | 0 | | Ssl_cipher | | | Ssl_cipher_list | | | Ssl_client_connects | 0 | | Ssl_connect_renegotiates | 0 | | Ssl_ctx_verify_depth | 18446744073709551615 | | Ssl_ctx_verify_mode | 5 | | Ssl_default_timeout | 0 | | Ssl_finished_accepts | 0 | | Ssl_finished_connects | 0 | | Ssl_session_cache_hits | 0 | | Ssl_session_cache_misses | 0 | | Ssl_session_cache_mode | SERVER | | Ssl_session_cache_overflows | 0 | | Ssl_session_cache_size | 128 | | Ssl_session_cache_timeouts | 0 | | Ssl_sessions_reused | 0 | | Ssl_used_session_cache_entries | 0 | | Ssl_verify_depth | 0 | | Ssl_verify_mode | 0 | | Ssl_version | | +--------------------------------+----------------------+ If SSL is disabled, you see results like the following. I can't connect to MySQL (issues with SSL and authorization) 1687 Amazon QuickSight User Guide +--------------------------------+-------+ | Variable_name | Value | +--------------------------------+-------+ | Ssl_accept_renegotiates | 0 | | Ssl_accepts | 0 | | Ssl_callback_cache_hits | 0 | | Ssl_cipher | | | Ssl_cipher_list | | | Ssl_client_connects | 0 | | Ssl_connect_renegotiates | 0 | | Ssl_ctx_verify_depth | 0 | | Ssl_ctx_verify_mode | 0 | | Ssl_default_timeout | 0 | | Ssl_finished_accepts | 0 | | Ssl_finished_connects | 0 | | Ssl_session_cache_hits | 0 | | Ssl_session_cache_misses | 0 | | Ssl_session_cache_mode | NONE | | Ssl_session_cache_overflows | 0 | | Ssl_session_cache_size | 0 | | Ssl_session_cache_timeouts | 0 | | Ssl_sessions_reused | 0 | | Ssl_used_session_cache_entries | 0 | | Ssl_verify_depth | 0 | | Ssl_verify_mode | 0 | | Ssl_version | | +--------------------------------+-------+ 3. Make sure that you have installed a supported SSL certificate on the database server. 4. Grant usage for the specific user to connect using SSL. GRANT USAGE ON *.* TO 'encrypted_user'@'%' REQUIRE SSL; For more detail on the solution in this example, see the following: • SSL Support for MySQL DB Instances in the Amazon RDS User Guide. I can't connect to MySQL (issues with SSL and authorization) 1688 Amazon QuickSight User Guide • Using SSL to Encrypt a Connection to a DB Instance in the Amazon RDS User Guide. • MySQL documentation I can't connect to RDS For details on troubleshooting connections to Amazon RDS, see Creating a dataset from a database. You can also refer to the Amazon RDS documentation on troubleshooting connections, Cannot Connect to Amazon RDS DB Instance. Login issues with Amazon QuickSight Use the following section to help you troubleshoot login and access issues with the Amazon QuickSight console. Topics • Insufficient permissions when using Athena with Amazon QuickSight • Amazon QuickSight isn't working in my browser • How do I delete my Amazon QuickSight account? • Individuals in my organization get an "External Login is Unauthorized" message when they try to access Amazon QuickSight • My email sign-in stopped working Insufficient permissions when using Athena with Amazon QuickSight If you receive an error message that says you have insufficient permissions, try the following steps to resolve your problem. You need administrator permissions to troubleshoot this issue. To resolve an insufficient permissions error 1. Make sure that Amazon QuickSight can access the Amazon S3 buckets used by Athena: a. To do this, choose your profile name (upper right). Choose Manage QuickSight, and then choose Security & permissions. I can't connect to RDS 1689 Amazon QuickSight User Guide b. Choose Add or remove. c. Locate Athena in the list. Clear the check box by Athena, then select it again to enable Athena. Choose Connect both. d. Choose the buckets that you want to access from Amazon QuickSight. The settings for S3 buckets that you access here are the same ones that you access by choosing Amazon S3 from the list of AWS services. Be careful that you don't inadvertently e. f. disable a bucket that someone else uses. Choose Select to save your S3 buckets. Choose Update to save your new settings for Amazon QuickSight access to AWS services. Or choose Cancel to exit without making any changes. 2. If your data file is encrypted with an AWS KMS key, grant permissions to the Amazon QuickSight IAM role to decrypt the key. The easiest way to do this is to use the AWS CLI. You can run the create-grant command in AWS CLI to do this. aws kms create-grant --key-id <AWS KMS key ARN> --grantee-principal <Your Amazon QuickSight Role ARN> --operations Decrypt The Amazon Resource Name (ARN) for the Amazon QuickSight role has the format arn:aws:iam::<account id>:role/service-role/aws-quicksight-service- role-v<version number> and can be accessed from the IAM console. To find your AWS KMS key ARN, use the S3 console. Go to the bucket that contains your data file and choose |
amazon-quicksight-user-461 | amazon-quicksight-user.pdf | 461 | key, grant permissions to the Amazon QuickSight IAM role to decrypt the key. The easiest way to do this is to use the AWS CLI. You can run the create-grant command in AWS CLI to do this. aws kms create-grant --key-id <AWS KMS key ARN> --grantee-principal <Your Amazon QuickSight Role ARN> --operations Decrypt The Amazon Resource Name (ARN) for the Amazon QuickSight role has the format arn:aws:iam::<account id>:role/service-role/aws-quicksight-service- role-v<version number> and can be accessed from the IAM console. To find your AWS KMS key ARN, use the S3 console. Go to the bucket that contains your data file and choose the Overview tab. The key is located near KMS key ID. For Amazon Athena, Amazon S3, and Athena Query Federation connections, QuickSight uses the following IAM role by default: arn:aws:iam::AWS-ACCOUNT-ID:role/service-role/aws-quicksight-s3-consumers-role-v0 If the aws-quicksight-s3-consumers-role-v0 is not present, then QuickSight uses: arn:aws:iam::AWS-ACCOUNT-ID:role/service-role/aws-quicksight-service-role-v0 Insufficient permissions with Athena 1690 Amazon QuickSight User Guide Amazon QuickSight isn't working in my browser If you can't view Amazon QuickSight correctly in your Google Chrome browser, take the following steps to fix the problem. To view Amazon QuickSight in your Chrome browser 1. Open Chrome and go to chrome://flags/#touch-events. 2. If the option is set to Automatic, change it to Disabled. 3. Close and reopen Chrome. How do I delete my Amazon QuickSight account? In some cases, you might need to delete your Amazon QuickSight account even when you can't access Amazon QuickSight to unsubscribe. If so, sign in to AWS and use the following link to open the unsubscribe screen: https://us-east-1.quicksight.aws.amazon.com/sn/console/ unsubscribe. This approach works no matter what AWS Regions that you use. It deletes all data, analyses, Amazon QuickSight users, and Amazon QuickSight administrators. If you have further difficulty, contact support. Individuals in my organization get an "External Login is Unauthorized" message when they try to access Amazon QuickSight Intended audience: Amazon QuickSight administrators When an individual in your organization is federating into Amazon QuickSight using AssumeRoleWithWebIdentity, QuickSight maps a single role-based user to a single external login. In some cases, that individual might be authenticated through an external login (such as Amazon Cognito) that's different from the originally mapped user. If so, they can't access QuickSight and get the following unexpected error message. The external login used for federation is unauthorized for the QuickSight user. To learn how to troubleshoot this issue, see the following sections: • Why is this happening? • How can I fix it? Amazon QuickSight isn't working in my browser 1691 Amazon QuickSight Why is this happening? You are using a simplified Amazon Cognito flow User Guide If you're using Amazon Cognito to federate into QuickSight, the single sign-on (IAM Identity Center) setup might use the CognitoIdentityCredentials API operation to assume the QuickSight role. This method maps all users in the Amazon Cognito identity pool to a single QuickSight user and isn't supported by Amazon QuickSight. We recommend that you use the AssumeRoleWithWebIdentity API operation instead, which specifies the role session name. You're using unauthenticated Amazon Cognito users Amazon Cognito IAM Identity Center is set up for unauthenticated users in the Amazon Cognito identity pool. The QuickSight role trust policy is set up like the following example. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Federated": "cognito-identity.amazonaws.com" }, "Action": "sts:AssumeRoleWithWebIdentity", "Condition": { "StringEquals": { "cognito-identity.amazonaws.com:aud": "us-west-2:cognito-pool-id" }, "ForAnyValue:StringLike": { "cognito-identity.amazonaws.com:amr": "unauthenticated" } } } ] } This setup allows a temporary Amazon Cognito user to assume a role session mapped to a unique QuickSight user. Because unauthenticated identities are temporary, they aren't supported by QuickSight. Individuals in my organization get "External Login is Unauthorized" 1692 Amazon QuickSight User Guide We recommend that you don't use this setup, which setup isn't supported by Amazon QuickSight. For Amazon QuickSight, make sure that the Amazon Cognito IAM Identity Center uses authenticated users. You deleted and recreated an Amazon Cognito user with the same user name attributes In this case, the associated Amazon Cognito user that's mapped to the Amazon QuickSight user was deleted and recreated. The newly created Amazon Cognito user has a different underlying subject. Depending on how the role session name is mapped to the QuickSight user, the session name might correspond to the same QuickSight role-based user. We recommend that you remap the QuickSight user to the updated Amazon Cognito user subject by using the UpdateUser API operation. For more information, see the following UpdateUser API example. You're mapping multiple Amazon Cognito user pools in different AWS accounts to one identity pool and with QuickSight Mapping multiple Amazon Cognito user pools in different AWS accounts to one identity pool and QuickSight isn't supported by Amazon QuickSight. How can I fix it? You can use QuickSight public API operations to update the external login information for your users. Use the following options to learn how. Use RegisterUser to create users |
amazon-quicksight-user-462 | amazon-quicksight-user.pdf | 462 | that you remap the QuickSight user to the updated Amazon Cognito user subject by using the UpdateUser API operation. For more information, see the following UpdateUser API example. You're mapping multiple Amazon Cognito user pools in different AWS accounts to one identity pool and with QuickSight Mapping multiple Amazon Cognito user pools in different AWS accounts to one identity pool and QuickSight isn't supported by Amazon QuickSight. How can I fix it? You can use QuickSight public API operations to update the external login information for your users. Use the following options to learn how. Use RegisterUser to create users with external login information If the external login provider is Amazon Cognito, use the following CLI code to create users. aws quicksight register-user --aws-account-id account-id --namespace namespace -- email user-email --user-role user-role --identity-type IAM --iam-arn arn:aws:iam::account-id:role/cognito-associated-iam-role --session-name cognito-username --external-login-federation-provider-type COGNITO --external-login-id cognito-identity-id --region identity-region The external-login-id should be the identity ID for the Amazon Cognito user. The format is <identity-region>:<cognito-user-sub>, as shown in the following example. aws quicksight register-user --aws-account-id 111222333 --namespace default --email [email protected] --user-role ADMIN --identity-type IAM Individuals in my organization get "External Login is Unauthorized" 1693 Amazon QuickSight User Guide --iam-arn arn:aws:iam::111222333:role/CognitoQuickSightRole --session-name cognito-user --external-login-federation-provider-type COGNITO --external-login-id us-east-1:12345678-1234-1234-abc1-a1b1234567 --region us-east-1 If the external login provider is a custom OpenID Connect (OIDC) provider, use the following CLI code to create users. aws quicksight register-user --aws-account-id account-id --namespace namespace --email user-email --user-role user-role --identity-type IAM --iam-arn arn:aws:iam::account-id:role/identity-provider-associated-iam-role --session-name identity-username --external-login-federation-provider-type CUSTOM_OIDC --custom-federation-provider-url custom-identity-provider-url --external-login-id custom-provider-identity-id --region identity-region The following is an example. aws quicksight register-user --aws-account-id 111222333 --namespace default --email [email protected] --user-role ADMIN --identity-type IAM --iam-arn arn:aws:iam::111222333:role/CustomIdentityQuickSightRole --session-name identity-user --external-login-federation-provider-type CUSTOM_OIDC --custom-federation-provider-url idp.us-east-1.amazonaws.com/us-east-1_ABCDE --external-login-id 12345678-1234-1234-abc1-a1b1234567 --region us-east-1 To learn more about using RegisterUser in the CLI, see RegisterUser in the Amazon QuickSight API Reference. Use DescribeUser to check external login information for users If a user is a role-based federated user from an external login provider, use the DescribeUser API operation to check the external login information for it, as shown in the following code. aws quicksight describe-user --aws-account-id account-id --namespace namespace --user-name identity-provider-associated-iam-role/identity-username --region identity-region The following is an example. aws quicksight describe-user --aws-account-id 111222333 --namespace default --user-name IdentityQuickSightRole/user --region us-west-2 The result contains the external login information fields if there are any. Following is an example. Individuals in my organization get "External Login is Unauthorized" 1694 Amazon QuickSight { "Status": 200, "User": { User Guide "Arn": "arn:aws:quicksight:us-east-1:111222333:user-default- IdentityQuickSightRole-user", "UserName": "IdentityQuickSightRole-user", "Email": "[email protected]", "Role": "ADMIN", "IdentityType": "IAM", "Active": true, "PrincipalId": "federated-iam-AROAAAAAAAAAAAAAA:user", "ExternalLoginFederationProviderType": "COGNITO", "ExternalLoginFederationProviderUrl": "cognito-identity.amazonaws.com", "ExternalLoginId": "us-east-1:123abc-1234-123a-b123-12345678a" }, "RequestId": "12345678-1234-1234-abc1-a1b1234567" } To learn more about using DescribeUser in the CLI, see DescribeUser in the Amazon QuickSight API Reference. Use UpdateUser to update external login information for users In some cases, you might find that the external login information saved for the user from the DescribeUser result isn't correct or the external login information is missing. If so, you can use the UpdateUser API operation to update it. Use the following examples. For Amazon Cognito users, use the following. aws quicksight update-user --aws-account-id account-id --namespace namespace --user-name cognito-associated-iam-role/cognito-username --email user-email --role user-role --external-login-federation-provider-type COGNITO --external-login-id cognito-identity-id --region identity-region The following is an example. aws quicksight update-user --aws-account-id 111222333 --namespace default --user-name CognitoQuickSightRole/cognito-user --email [email protected] --role ADMIN --external-login-federation-provider-type COGNITO --external-login-id us-east-1:12345678-1234-1234-abc1-a1b1234567 --region us-west-2 Individuals in my organization get "External Login is Unauthorized" 1695 Amazon QuickSight User Guide For custom OIDC provider users, use the following. aws quicksight update-user --aws-account-id account-id --namespace namespace --user-name identity-provider-associated-iam-role/identity-username --email user-email --role user-role --external-login-federation-provider-type CUSTOM_OIDC --custom-federation-provider-url custom-identity-provider-url --external-login-id custom-provider-identity-id --region identity-region The following is an example. aws quicksight update-user --aws-account-id 111222333 --namespace default --user-name IdentityQuickSightRole/user --email [email protected] --role ADMIN --external-login-federation-provider-type CUSTOM_OIDC --custom-federation-provider-url idp.us-east-1.amazonaws.com/us-east-1_ABCDE --external-login-id 123abc-1234-123a-b123-12345678a --region us-west-2 If you want to delete the external login information for the user, use NONE external login federation provider type. Use the following CLI command to delete external login information. aws quicksight update-user --aws-account-id account-id --namespace namespace --user-name identity-provider-associated-iam-role/identity-username --email user-email --role user-role --external-login-federation-provider-type NONE --region identity-region The following is an example. aws quicksight update-user --aws-account-id 111222333 --namespace default --user-name CognitoQuickSightRole/cognito-user --email [email protected] --role ADMIN --external-login-federation-provider-type NONE --region us-west-2 To learn more about using UpdateUser in the CLI, see the UpdateUser in the Amazon QuickSight API Reference. My email sign-in stopped working Currently, emails are case-sensitive. If yours isn't working, ask your administrator to check it for a mix of upper and lowercase letters. Use your email as it was entered. My email sign-in stopped working 1696 Amazon QuickSight User Guide Visual issues with Amazon QuickSight Use the following section to help you troubleshoot problems with visuals and their formatting. Topics • I can't see my visuals • I get a feedback bar across my printed documents • My map charts don't show locations • My pivot table stops working • My visual can’t find missing columns • My |
amazon-quicksight-user-463 | amazon-quicksight-user.pdf | 463 | sign-in stopped working Currently, emails are case-sensitive. If yours isn't working, ask your administrator to check it for a mix of upper and lowercase letters. Use your email as it was entered. My email sign-in stopped working 1696 Amazon QuickSight User Guide Visual issues with Amazon QuickSight Use the following section to help you troubleshoot problems with visuals and their formatting. Topics • I can't see my visuals • I get a feedback bar across my printed documents • My map charts don't show locations • My pivot table stops working • My visual can’t find missing columns • My visual can’t find the query table • My visual doesn't update after I change a calculated field • Values in a Microsoft Excel file with scientific notation don't format correctly in QuickSight I can't see my visuals Use the following section to help you troubleshoot missing visuals. Before you continue, check to make sure you can still access your data source. If you can't connect to your data source, see Data source connectivity issues for Amazon QuickSight. • If you are having trouble adding a visual to an analysis, try the following: • Check your connectivity and confirm that you have access to all domains that QuickSight uses for access. To see a list of all URLs QuickSight uses, see Domains accessed by QuickSight. • Check that you aren't trying to add more objects than the quota allows. Amazon QuickSight supports up to 30 datasets in a single analysis, up to 30 visuals in a single sheet, and a limit of 20 sheets per analysis. • Suppose that you are editing an analysis for a selected data source and the connection to the data source ends unexpectedly. The resulting error state can prevent further changes to the analysis. In this case, you can't add more visuals to the analysis. Check for this state. • If your visuals don't load, try the following: • If you are using a corporate network, seek out help from your network administrator and verify that the network's firewall settings permit traffic from *.aws.amazon.com, amazonaws.com, wss://*.aws.amazon.com, and cloudfront.net. Visual issues 1697 Amazon QuickSight User Guide • Add exceptions to your ad blocker for *.aws.amazon.com, amazonaws.com, wss:// *.aws.amazon.com, and cloudfront.net. • If you are using a proxy server, verify that *.quicksight.aws.amazon.com and cloudfront.net are added to the list of approved domains (the allow list). I get a feedback bar across my printed documents The browser sometimes prints the document feedback bar across the page, blocking some printed content. To avoid this problem, use the twirl-down icon on the bottom left of the screen (shown following) to minimize the feedback bar. Then print your document. My map charts don't show locations For automatic mapping, called geocoding, to work on map charts, make sure that your data is prepared following specific rules. For help with geospatial issues, see Geospatial troubleshooting. For help with preparing data for geospatial charts, see Adding geospatial data. My pivot table stops working If your pivot table exceeds the computational limitations of the underlying database, this is usually caused by the combination of items in the field wells. That is, it's caused by a combination of rows, columns, metrics, and table calculations. To reduce the level of complexity and the potential for errors, simplify your pivot table. For more information, see Pivot table best practices. My visual can’t find missing columns The visuals in my analysis aren't working as expected. The error message says "The column(s) used in this visual do not exist." The most common cause of this error is that your data source schema changed. For example, it's possible a column name changed from a_column to b_column. Depending on how your dataset accesses the data source, choose one of the following. I get a feedback bar across my printed documents 1698 Amazon QuickSight User Guide • If the dataset is based on custom SQL, do one or more of the following: • Edit the dataset. • Edit the SQL statement. For example, if the table name changed from a_column to b_column, you can update the SQL statement to create an alias: SELECT b_column as a_column. By using the alias to maintain the same field name in the dataset, you avoid having to add the column to your visuals as a new entity. When you're done, choose Save & visualize. • If the dataset isn't based on custom SQL, do one or more of the following: • Edit the dataset. • For fields that now have different names, rename them in the dataset. You can use the field names from your original dataset. Then open your analysis and add the renamed fields to the affected visuals. When you're done, choose Save & visualize. My visual can’t find the query table In this case, the |
amazon-quicksight-user-464 | amazon-quicksight-user.pdf | 464 | field name in the dataset, you avoid having to add the column to your visuals as a new entity. When you're done, choose Save & visualize. • If the dataset isn't based on custom SQL, do one or more of the following: • Edit the dataset. • For fields that now have different names, rename them in the dataset. You can use the field names from your original dataset. Then open your analysis and add the renamed fields to the affected visuals. When you're done, choose Save & visualize. My visual can’t find the query table In this case, the visuals in your analysis aren't working as expected. The error message says "Amazon QuickSight can’t find the query table." The most common cause of this error is that your data source schema changed. For example, it's possible a table name changed from x_table to y_table. Depending on how the dataset accesses the data source, choose one of the following. • If the dataset is based on custom SQL, do one or more of the following: • Edit the dataset. • Edit the SQL statement. For example, if the table name changed from x_table to y_table, you can update the FROM clause in the SQL statement to refer to the new table instead. When you're done, choose Save & visualize, then choose each visual and readd the fields as needed. • If the dataset isn't based on custom SQL, do the following: My visual can’t find the query table 1699 Amazon QuickSight User Guide 1. Create a new dataset using the new table, y_table for example. 2. Open your analysis. 3. Replace the original dataset with the newly created dataset. If there are no column changes, all the visuals should work after you replace the dataset. For more information, see Replacing datasets. My visual doesn't update after I change a calculated field When you update a calculated field that many other fields depend on, the consuming entities might not update as expected. For example, when you update a calculated field that's used by a field being visualized, the visual doesn't update as expected. To resolve this issue, refresh your internet browser. Values in a Microsoft Excel file with scientific notation don't format correctly in QuickSight When you connect to a Microsoft Excel file that has a number column that contains values with scientific notation, they might not format correctly in Amazon QuickSight. For example, the value 1.59964E+11, which is actually 159964032802, formats as 159964000000 in QuickSight. This can lead to an incorrect analysis. To resolve this issue, format the column as Text in Microsoft Excel, and then upload the file to QuickSight. My visual doesn't update after I change a calculated field 1700 Amazon QuickSight User Guide Administration for Amazon QuickSight Use the following section to learn about Amazon QuickSight administrative tasks. This section contains information about controlling access, managing accounts, and choosing AWS Regions. Topics • Different editions of Amazon QuickSight • AWS Regions, websites, IP address ranges, and endpoints • Supported browsers • Managing Amazon QuickSight • Supporting multitenancy with isolated namespaces • Customizing the QuickSight console • Amazon QuickSight brand customization • Tracking AWS account cost and usage data with Billing and Cost Management and Amazon QuickSight Different editions of Amazon QuickSight Amazon QuickSight offers Standard and Enterprise editions. To learn more about the differences in availability, user management, permissions, and security between the two versions, see the following topic. Both editions offer a full set of features for creating and sharing data visualizations. Enterprise edition additionally offers encryption at rest and Microsoft Active Directory integration. In Enterprise edition, you select a Microsoft Active Directory directory in AWS Directory Service. You use that active directory to identify and manage your Amazon QuickSight users and administrators. For more information about the different features offered by the Amazon QuickSight editions and about pricing, see Amazon QuickSight pricing. Topics • Availability of editions • User management between editions • Permissions for the different editions Different editions of Amazon QuickSight 1701 Amazon QuickSight Availability of editions User Guide All editions are available in any AWS Region that is currently supported by Amazon QuickSight. The capacity region in which you start your Amazon QuickSight subscription is where your account's default SPICE capacity is allocated. However, you can purchase additional SPICE capacity and access your AWS resources in any other supported AWS Region. You can start a new Amazon QuickSight subscription using Standard edition, choosing any default capacity region. You can then upgrade it to Enterprise edition at any time. To manage Enterprise account settings, you must temporarily change your region for your session to US East (N. Virginia) Region. You can change it back when you have finished editing your account settings. These settings include changing your subscription's notification email, enabling IAM access |
amazon-quicksight-user-465 | amazon-quicksight-user.pdf | 465 | QuickSight subscription is where your account's default SPICE capacity is allocated. However, you can purchase additional SPICE capacity and access your AWS resources in any other supported AWS Region. You can start a new Amazon QuickSight subscription using Standard edition, choosing any default capacity region. You can then upgrade it to Enterprise edition at any time. To manage Enterprise account settings, you must temporarily change your region for your session to US East (N. Virginia) Region. You can change it back when you have finished editing your account settings. These settings include changing your subscription's notification email, enabling IAM access requests, editing access to AWS resources, and unsubscribing from Amazon QuickSight. User management between editions User management is different between the Amazon QuickSight Standard and Enterprise editions. However, both editions support identity federation, or Federated Single Sign-On (IAM Identity Center), through Security Assertion Markup Language 2.0 (SAML 2.0). User management for standard edition In Standard edition, you can invite an AWS Identity and Access Management user and allow that user to use their credentials to access Amazon QuickSight. Alternatively, you can invite any person with an email address to create an Amazon QuickSight–only account. When you create a QuickSight user account, Amazon QuickSight sends email to that user inviting them to activate their account. When you create a QuickSight user account, you also choose to assign it either an administrative or a user role. This role assignment determines the user's permissions in Amazon QuickSight. You perform all management of users by adding, changing, and deleting accounts in Amazon QuickSight. User management for enterprise edition In Enterprise edition, you can select one or more IAM Identity Center or Microsoft Active Directory groups for administrative access. All users in these groups are authorized to sign in to Amazon Availability of editions 1702 Amazon QuickSight User Guide QuickSight as administrators. You can also select one or more IAM Identity Center or Microsoft Active Directory groups in AWS Directory Service for user access. All users in these groups are authorized to sign in to Amazon QuickSight as users. Important With IAM Identity Center, share the AWS sign in portal with end users to access QuickSight. For more information, see Sign in to the AWS access portal. With Active Directory, Amazon QuickSight Administrators and users aren't automatically notified of their access to Amazon QuickSight. You must email users with the sign-in URL, the account name, and their credentials. You can only add or remove Enterprise edition accounts by adding or removing a person from the IAM Identity Center or Microsoft Active Directory group that you associated with Amazon QuickSight. When you add a QuickSight user account, its permissions depend on whether the IAM Identity Center or Microsoft Active Directory group is an administrative group or a user group in Amazon QuickSight. To remove a user's access to QuickSight, remove the user from an IAM Identity Center or Microsoft Active Directory group or remove their IAM Identity Center or Microsoft Active Directory group from an associated role in Amazon QuickSight. Permissions for the different editions In the Standard edition, all Amazon QuickSight administrators can manage subscriptions and SPICE capacity. They can also add, modify, and delete accounts. Additional IAM permissions are required to manage Amazon QuickSight permissions to AWS resources and to unsubscribe from Amazon QuickSight. These tasks can only be performed by an IAM user who also has administrative permissions in Amazon QuickSight, or by the IAM user or AWS account that created the Amazon QuickSight account. To manage access to AWS resources from Amazon QuickSight, you must be logged in as one of the following: • Any IAM user who is an Amazon QuickSight administrator • The IAM user or AWS root account that created the Amazon QuickSight account Permissions for the different editions 1703 Amazon QuickSight User Guide All IAM Identity Center or Microsoft Active Directory users that are Amazon QuickSight administrators can manage subscriptions and SPICE capacity. Additional IAM permissions are required to manage access to AWS resources or to unsubscribe from Amazon QuickSight. Administrators need to sign in with IAM permissions to perform these tasks. The following table summarizes the admin actions that you can perform in QuickSight based on the access type that you choose. Admin action IAM permissions QuickSight administrator (non-IAM) Yes Yes Yes Yes Yes Manage assets Security & permissions Manage VPC connections KMS keys Account settings Account customization Manage users Your subscriptions Mobile settings Domains and embedding SPICE capacity Yes Yes Yes Yes Yes Yes AWS Regions, websites, IP address ranges, and endpoints AWS cloud-computing resources are housed in highly available facilities in different areas of the world (for example, North America, Europe, and Asia). These facilities are each part of an AWS Region. For more information about AWS Regions and Availability Zones (AZs), see Global infrastructure. |
amazon-quicksight-user-466 | amazon-quicksight-user.pdf | 466 | access type that you choose. Admin action IAM permissions QuickSight administrator (non-IAM) Yes Yes Yes Yes Yes Manage assets Security & permissions Manage VPC connections KMS keys Account settings Account customization Manage users Your subscriptions Mobile settings Domains and embedding SPICE capacity Yes Yes Yes Yes Yes Yes AWS Regions, websites, IP address ranges, and endpoints AWS cloud-computing resources are housed in highly available facilities in different areas of the world (for example, North America, Europe, and Asia). These facilities are each part of an AWS Region. For more information about AWS Regions and Availability Zones (AZs), see Global infrastructure. Regions and IP ranges 1704 Amazon QuickSight User Guide The IP addresses listed in the sections below are the ranges where QuickSight traffic originates from when making outbound connections to databases. They are not the IP address ranges that you use to connect to the QuickSight website or service API. For more information about authorizing QuickSight, see Authorizing connections to AWS data stores. Topics • Supported AWS Regions for Amazon QuickSight • Supported AWS Regions for Amazon Q in QuickSight • Supported AWS Regions for Amazon QuickSight Q • Cross-Region inference with Amazon Q in QuickSight Supported AWS Regions for Amazon QuickSight Amazon QuickSight is currently supported in the following AWS Regions. The following list provides websites, IP address ranges, and endpoints for Amazon QuickSight in each AWS Region. • US East (Ohio) (us-east-2) • Website for user access – https://us-east-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.us-east-2.amazonaws.com • IP address range for data source connectivity – 52.15.247.160/27 • US East (N. Virginia) (us-east-1) • Website for user access – https://us-east-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.us-east-1.amazonaws.com • IP address range for data source connectivity – 52.23.63.224/27 • US West (Oregon) (us-west-2) • Website for user access – https://us-west-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.us-west-2.amazonaws.com • IP address range for data source connectivity – 54.70.204.128/27 • Africa (Cape Town) (af-south-1) • Website for user access – https://af-south-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.af-south-1.amazonaws.com • IP address range for data source connectivity – 13.246.220.192/27 • Asia Pacific (Jakarta) (ap-southeast-3) Supported AWS Regions for Amazon QuickSight 1705 Amazon QuickSight User Guide • Website for user access – https://ap-southeast-3.quicksight.aws.amazon.com • Service API endpoint – quicksight.ap-southeast-3.amazonaws.com • IP address range for data source connectivity – 43.218.71.192/27 • Asia Pacific (Mumbai) (ap-south-1) • Website for user access – https://ap-south-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.ap-south-1.amazonaws.com • IP address range for data source connectivity – 52.66.193.64/27 • Asia Pacific (Seoul) (ap-northeast-2) • Website for user access – https://ap-northeast-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.ap-northeast-2.amazonaws.com • IP address range for data source connectivity – 13.124.145.32/27 • Asia Pacific (Singapore) (ap-southeast-1) • Website for user access – https://ap-southeast-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.ap-southeast-1.amazonaws.com • IP address range for data source connectivity – 13.229.254.0/27 • Asia Pacific (Sydney) (ap-southeast-2) • Website for user access – https://ap-southeast-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.ap-southeast-2.amazonaws.com • IP address range for data source connectivity – 54.153.249.96/27 • Asia Pacific (Tokyo) (ap-northeast-1) • Website for user access – https://ap-northeast-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.ap-northeast-1.amazonaws.com • IP address range for data source connectivity – 13.113.244.32/27 • Canada (Central) (ca-central-1) • Website for user access – https://ca-central-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.ca-central-1.amazonaws.com • IP address range for data source connectivity – 15.223.73.0/27 • China (Beijing) (cn-north-1) • Website for user access – https://cn-north-1.quicksight.amazonaws.cn Supported AWS Regions for Amazon QuickSight • Service API endpoint quicksight.cn-north-1.amazonaws.com.cn 1706 Amazon QuickSight User Guide • IP address range for data source connectivity – 71.136.65.64/27 • Europe (Frankfurt) (eu-central-1) • Website for user access – https://eu-central-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-central-1.amazonaws.com • IP address range for data source connectivity – 35.158.127.192/27 • Europe (Ireland) (eu-west-1) • Website for user access – https://eu-west-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-west-1.amazonaws.com • IP address range for data source connectivity – 52.210.255.224/27 • Europe (London) (eu-west-2) • Website for user access – https://eu-west-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-west-2.amazonaws.com • IP address range for data source connectivity – 35.177.218.0/27 • Europe (Milan) (eu-south-1) • Website for user access – https://eu-south-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-south-1.amazonaws.com • IP address range for data source connectivity – 18.102.150.128/27 • Europe (Paris) (eu-west-3) • Website for user access – https://eu-west-3.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-west-3.amazonaws.com • IP address range for data source connectivity – 13.38.202.0/27 • Europe (Spain) (eu-south-2) • Website for user access – https://eu-south-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-south-2.amazonaws.com • IP address range for data source connectivity – 18.101.99.160/27 • Europe (Stockholm) (eu-north-1) • Website for user access – https://eu-north-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-north-1.amazonaws.com • IP address range for data source connectivity – 13.53.191.64/27 • Europe (Zurich) (eu-central-2) Supported AWS Regions for Amazon QuickSight 1707 Amazon QuickSight User Guide • Website for user access – https://eu-central-2.quicksight.aws.amazon.com • Service API endpoint |
amazon-quicksight-user-467 | amazon-quicksight-user.pdf | 467 | user access – https://eu-west-3.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-west-3.amazonaws.com • IP address range for data source connectivity – 13.38.202.0/27 • Europe (Spain) (eu-south-2) • Website for user access – https://eu-south-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-south-2.amazonaws.com • IP address range for data source connectivity – 18.101.99.160/27 • Europe (Stockholm) (eu-north-1) • Website for user access – https://eu-north-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-north-1.amazonaws.com • IP address range for data source connectivity – 13.53.191.64/27 • Europe (Zurich) (eu-central-2) Supported AWS Regions for Amazon QuickSight 1707 Amazon QuickSight User Guide • Website for user access – https://eu-central-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-central-2.amazonaws.com • IP address range for data source connectivity – 16.63.53.32/27 • South America (São Paulo) (sa-east-1) • Website for user access – https://sa-east-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.sa-east-1.amazonaws.com • IP address range for data source connectivity – 18.230.46.192/27 • AWS GovCloud (US-East) (gov-east-1) • Website for user access – quicksight.us-gov-east-1.amazonaws.com • Service API endpoint – quicksight.us-gov-east-1.amazonaws.com • IP address range for data source connectivity – 18.252.165.64/27 • AWS GovCloud (US-West) (gov-west-1) • Website for user access – quicksight.us-gov-west-1.amazonaws.com • Service API endpoint – quicksight.us-gov-west-1.amazonaws.com • IP address range for data source connectivity – 160.1.180.32/27 Supported AWS Regions for Amazon Q in QuickSight Amazon Q in QuickSight Generative BI features are currently supported in the following AWS Regions. The following list provides websites, IP address ranges, and endpoints for Generative BI features in each AWS Region. • US East (N. Virginia) (us-east-1) • Website for user access – https://us-east-1.quicksight.aws.amazon.com • API endpoint (HTTPS) – quicksight.us-east-1.amazonaws.com • IP address range for data source connectivity – 52.23.63.224/27 • US West (Oregon) (us-west-2) • Website for user access – https://us-west-2.quicksight.aws.amazon.com • API endpoint (HTTPS) – quicksight.us-west-2.amazonaws.com • IP address range for data source connectivity – 54.70.204.128/27 • Asia Pacific (Mumbai) (ap-south-1) • Website for user access – https://ap-south-1.quicksight.aws.amazon.com Supported AWS Regions for Amazon Q in QuickSight 1708 Amazon QuickSight User Guide • Service API endpoint – quicksight.ap-south-1.amazonaws.com • IP address range for data source connectivity – 52.66.193.64/27 • Asia Pacific (Sydney) (ap-southeast-2) • Website for user access – https://ap-southeast-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.ap-southeast-2.amazonaws.com • IP address range for data source connectivity – 54.153.249.96/27 • Canada (Central) (ca-central-1) • Website for user access – https://ca-central-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.ca-central-1.amazonaws.com • IP address range for data source connectivity – 15.223.73.0/27 • Europe (Frankfurt) (eu-central-1) • Website for user access – https://eu-central-1.quicksight.aws.amazon.com • API endpoint (HTTPS) – quicksight.eu-central-1.amazonaws.com • IP address range for data source connectivity – 35.158.127.192/27 • Europe (Ireland) (eu-west-1) • Website for user access – https://eu-west-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-west-1.amazonaws.com • IP address range for data source connectivity – 52.210.255.224/27 • Europe (London) (eu-west-2) • Website for user access – https://eu-west-2.quicksight.aws.amazon.com • Service API endpoint – quicksight.eu-west-2.amazonaws.com • IP address range for data source connectivity – 35.177.218.0/27 • South America (São Paulo) (sa-east-1) • Website for user access – https://sa-east-1.quicksight.aws.amazon.com • Service API endpoint – quicksight.sa-east-1.amazonaws.com • IP address range for data source connectivity – 18.230.46.192/27 Supported AWS Regions for Amazon QuickSight Q Amazon QuickSight Q is currently supported in the following AWS Regions. The following list provides websites, IP address ranges, and endpoints for Amazon QuickSight Q in each AWS Region. Supported AWS Regions for Amazon QuickSight Q 1709 Amazon QuickSight • US East (Ohio) (us-east-2) User Guide • Website for user access – https://us-east-2.quicksight.aws.amazon.com • API endpoint (HTTPS) – quicksight.us-east-2.amazonaws.com • IP address range for data source connectivity – 52.15.247.160/27 Cross-Region inference with Amazon Q in QuickSight With cross-Region inference, Amazon Q in QuickSight will automatically select the optimal Region within your geography (as described in more detail below) to process your inference request, maximizing available compute resources and model availability, and providing the best customer experience. With cross-Region inference, you get: • Complete access to most advanced Amazon Q in QuickSight AI capabilities and features • Access to a variety of models suitable for different tasks • Improved performance for all your applications Cross-Region inference requests are kept within the AWS Regions that are part of the geography where the data originally resides. For example, a request made within the US is kept within the AWS Regions in the US. Although the data remains stored only in the primary Region, when using cross-Region inference, your input prompts and output results may move outside of your primary Region. All data will be transmitted encrypted across Amazon's secure network. Note There's no additional cost for using cross-Region inference. Amazon CloudWatch and AWS CloudTrail logs won't specify the AWS Region in which data inference occurs. Supported regions for Amazon Q in QuickSight cross-Region inference For a list of Region codes and endpoints supported in Amazon Q in QuickSight, see Supported AWS Regions for Amazon Q in QuickSight. Cross-Region inference with Amazon Q in QuickSight 1710 |
amazon-quicksight-user-468 | amazon-quicksight-user.pdf | 468 | data remains stored only in the primary Region, when using cross-Region inference, your input prompts and output results may move outside of your primary Region. All data will be transmitted encrypted across Amazon's secure network. Note There's no additional cost for using cross-Region inference. Amazon CloudWatch and AWS CloudTrail logs won't specify the AWS Region in which data inference occurs. Supported regions for Amazon Q in QuickSight cross-Region inference For a list of Region codes and endpoints supported in Amazon Q in QuickSight, see Supported AWS Regions for Amazon Q in QuickSight. Cross-Region inference with Amazon Q in QuickSight 1710 Amazon QuickSight User Guide Supported Amazon Q in QuickSight geography Inferenced regions United States United States US East (N. Virginia) (us-east-1) US West (Oregon) (us-west-2) European Union Europe (Frankfurt) (eu-central-1) European Union Europe (Ireland) (eu-west-1) European Union Europe (Paris) (eu-west-3) Supported browsers Before you start working with Amazon QuickSight, use the following table to verify that your browser is supported for Amazon QuickSight access. Note Amazon QuickSight ended support for Microsoft Internet Explorer 11 on July 31, 2022. We can no longer ensure that the features and web pages of Amazon QuickSight will function properly on IE 11. Please use one of our supported browsers: Microsoft Edge (Chromium), Google Chrome, or Mozilla Firefox. Browser Apple Safari Version 13 or later Check your version Open Safari. On the menu, choose Safari, and then choose About Safari. The version number is shown in the dialog box that displays. Supported browsers 1711 Amazon QuickSight User Guide Browser Version Check your version Google Chrome Last three versions Open Chrome and type chrome://version in your address bar. The version is in the Google Chrome field at the top of the results. Microsoft Edge (Chromium) Latest version Not applicable. Mozilla Firefox Last three versions Open Firefox. On the menu, choose the Help icon, and then choose About Firefox. The version number is listed underneath the Firefox name. Managing Amazon QuickSight If you are a QuickSight administrator, the account you use to sign in to QuickSight is in the ADMIN QuickSight group. There are also some permissions granted through IAM, which you might have already, or you can talk to your AWS account administrators to learn more. Use the following topics to manage QuickSight. Topics • QuickSight asset management • Amazon QuickSight subscriptions • Upgrading your Amazon QuickSight subscription from Standard edition to Enterprise edition • Managing SPICE memory capacity • Account settings • Managing domains and embedding QuickSight asset management Use this section to manage all of the assets in your Amazon QuickSight account in one unified view. Managing QuickSight 1712 Amazon QuickSight User Guide Here are some common reasons to use the asset manager: • Transfer assets – Quickly transfer assets from one user or group to another, for example when the original owner is no longer present. • Onboard new employees – Speed up onboarding of new employees by giving them access to the same assets that their teammates using. • Support authors – Better support authors in tenancies by giving support engineers temporary access to the author's dashboard. • Revoke access – Quickly audit and revoke permissions, for example after implementations, customer support, or unexpected events. To manage QuickSight assets 1. Choose the profile icon, then Manage QuickSight. 2. Open the asset manager by clicking on Manage assets. 3. You can search for assets by name, or browse for them in a list. Choose one of the following methods: To search by name, select the appropriate search bar, using the name as your guide. Enter your search term and press ENTER. Find assets a user or group has access to by using the Search by User or Group name bar. Find other assets by using the Search by asset name bar. To browse for assets by type, select a button by its name to view a type of asset, for example: browse analyses by selecting the Analyses button, browse for Data sources by selecting the Data sources button, and so on. Managing assets 1713 Amazon QuickSight User Guide 4. When you are viewing a list of your search results, you can interact with the assets listed. Here are a few examples: • Select an asset by toggling the box at the beginning of each row. Or, select everything by clicking the box at the top left of the list. • Change the type you are browsing for by selecting a different asset type from the Asset type list. • Use the vertical dot menu at right to perform an action on the asset in that row. • Use the Share button to share all of the selected assets. A popup window displays sharing options to apply to the users or groups you specify. • Use the Transfer button to transfer all of the |
amazon-quicksight-user-469 | amazon-quicksight-user.pdf | 469 | an asset by toggling the box at the beginning of each row. Or, select everything by clicking the box at the top left of the list. • Change the type you are browsing for by selecting a different asset type from the Asset type list. • Use the vertical dot menu at right to perform an action on the asset in that row. • Use the Share button to share all of the selected assets. A popup window displays sharing options to apply to the users or groups you specify. • Use the Transfer button to transfer all of the selected assets from one user or group to another. A popup window displays transferring options to apply to the users or groups you specify. When you need to share a QuickSight asset with 100 or more users, consider using QuickSight groups. For more information on QuickSight groups, see Creating and managing groups in Amazon QuickSight. Amazon QuickSight subscriptions You can purchase standard user subscriptions to get discounted pricing on Amazon QuickSight. When you invite additional users to Amazon QuickSight, you're charged for those accounts on a month-by-month basis. If you have Enterprise edition, you have the option to take advantage of pay-per-session pricing for reader accounts. These are users who only view data dashboards, and don't need author or admin access. When you purchase an annual subscription, you pay for a QuickSight user account on an annual rather than monthly basis. With an annual subscription, you receive a discounted price in return for the extended time commitment. You don't need to purchase an annual subscription to create or add users. For more information about pricing, see Amazon QuickSight. When you purchase a set of standard user subscriptions, you choose the number of accounts you want to cover. You also choose when to start the subscriptions (any time from the month following the current month, to one year in the future) and whether to autorenew them. All subscriptions that you purchase together must use the same values for these settings. You can edit an existing set of user subscriptions to change whether it autorenews. If the set is not yet active, you can also change the number of subscriptions it covers, or delete it entirely. Managing your subscriptions 1714 Amazon QuickSight Topics • Viewing current subscriptions • Purchase subscriptions • Editing a subscription • Delete a subscription Viewing current subscriptions User Guide Use the following procedure to view your current user subscriptions. To view your current user subscriptions 1. Choose your user name on the application bar and then choose Manage QuickSight. 2. Choose Manage pricing. 3. Use the subscription meter to see how many accounts you have and how they are billed. In the following example, the account has 21 users total: • Seven users with annual subscriptions. Only currently active subscriptions are shown here. • 13 month-to-month users. Pause over any section of the meter bar to display details about that user segment. 4. Use the information in the subscriptions table to see what current and future subscriptions you have. Purchase subscriptions Use the following procedure to purchase subscriptions. Managing your subscriptions 1715 Amazon QuickSight To purchase subscriptions User Guide 1. Choose your user name on the application bar and then choose Manage QuickSight. 2. Choose Manage pricing. 3. Navigate to the Authors and Admins section, and then choose Purchase plan. 4. Choose or enter the number of subscriptions you want. 5. Choose the month and year when the subscriptions will start. 6. Choose whether the subscriptions autorenew. 7. Choose Purchase. Editing a subscription Use the following procedure to edit subscriptions. To edit subscriptions 1. Choose your user name on the application bar and then choose Manage QuickSight. 2. Choose Manage pricing. 3. Next to the set of subscriptions you want to change, choose Manage. 4. (Optional) If the subscriptions haven't started yet, change the number of subscriptions. Managing your subscriptions 1716 Amazon QuickSight User Guide 5. Choose whether the subscriptions autorenew. 6. Choose Save changes. Delete a subscription Use the following procedure to delete subscriptions. You can only delete subscriptions that haven't started yet. To delete subscriptions 1. Choose your user name on the application bar and then choose Manage QuickSight. 2. Choose Manage pricing. 3. Next to the set of subscriptions that you want to delete, choose Edit. 4. Choose Delete Subscription. Note If you use AWS Key Management Service or AWS Secrets Manager with Amazon QuickSight, you are billed for access and maintenance as described in the pricing pages for each AWS product. For more information on how these products are billed, see the following: • AWS Key Management Service Pricing page • AWS Secrets Manager Pricing page In your billing statement, the costs are itemized under the appropriate product and not under Amazon QuickSight. Managing |
amazon-quicksight-user-470 | amazon-quicksight-user.pdf | 470 | choose Manage QuickSight. 2. Choose Manage pricing. 3. Next to the set of subscriptions that you want to delete, choose Edit. 4. Choose Delete Subscription. Note If you use AWS Key Management Service or AWS Secrets Manager with Amazon QuickSight, you are billed for access and maintenance as described in the pricing pages for each AWS product. For more information on how these products are billed, see the following: • AWS Key Management Service Pricing page • AWS Secrets Manager Pricing page In your billing statement, the costs are itemized under the appropriate product and not under Amazon QuickSight. Managing your subscriptions 1717 Amazon QuickSight User Guide Upgrading your Amazon QuickSight subscription from Standard edition to Enterprise edition You can upgrade from Amazon QuickSight Standard edition to Amazon QuickSight Enterprise edition. In Enterprise edition, Amazon QuickSight supports the following additional features: • Reader role with pay-per-session pricing; for more pricing details, see following. • Email reports for offline delivery of insights. • Larger SPICE datasets with up to 500 million rows per SPICE dataset. • Hourly refresh of SPICE data (using the QuickSight console). • ML Insights to make the most of your data, including the following: • Anomaly detection that can run on billions of rows of data on a schedule. • Contribution analysis to help you figure out key drivers. • One-click forecasting. • Customizable natural language narratives that you can use to add business context to a dashboard. • SageMaker AI integration. • Embedded analytics in applications and portals: • Embed dashboards with row level security. • Namespaces with multitenant support for creating dashboards with embedded analytics. • Templates for repeatable dashboard creation and management. • Capacity pricing for embedding. • Security and governance • Row-level security. • Private virtual private cloud (VPC) support based on Amazon VPC. • Folders for organization and sharing. • Fine-grained access control over Amazon S3, Amazon Athena, and other AWS services and resources. • AWS Lake Formation support. • User authentication and management options • Integration with Microsoft Active Directory with support for Active Directory groups. • Group support for user management. Upgrading your subscription 1718 Amazon QuickSight User Guide To see a full comparison of Standard edition with Enterprise edition, see Amazon QuickSight editions. When you upgrade your account, your administrators and authors are billed at the Amazon QuickSight Enterprise edition rates. For up-to-date information on rates, see Pricing. For pay-per- session pricing, you can add additional users as readers. Before you reprovision existing users as readers, you transfer or delete their resources, and then delete the users from your subscription. Users who are in the reader role can view and manipulate shared dashboards, and receive emailed updates. However, readers can't add or change data sources, datasets, analyses, visuals, or administrative settings. Billing for readers is significantly lower in cost than regular user pricing. It's based on 30-minute sessions, and it's capped at a maximum amount per month for each reader. Billing for upgrades is prorated for the month of the upgrade. Upgrades to users are also prorated. If you have an annual subscription to Standard edition, it's converted to Enterprise edition and stays in place for the remaining term. Warning Downgrading from Enterprise edition to Standard edition isn't currently possible due to the enhanced feature set available in Enterprise edition. To perform this downgrade, unsubscribe from Amazon QuickSight, and then start a new subscription. Also, you can't transfer users or assets between subscriptions. Upgrading to Enterprise edition to use Active Directory connectivity isn't supported. This is because of the differences in the user identity mechanisms between Amazon QuickSight password-based users and existing Active Directory users. However, you can upgrade to Enterprise and still use password-based users. If you want to upgrade and change how users sign in, you can unsubscribe and start a new subscription. Use the following procedure to upgrade to Enterprise edition. To perform the upgrade, you need administrative access to Amazon QuickSight, with security permissions to subscribe. The person performing the upgrade is usually an AWS administrator who is also an Amazon QuickSight administrator. To upgrade to enterprise edition 1. Open the administrative settings page by clicking on your profile icon at top right. 2. At top left, choose Upgrade now. Upgrading your subscription 1719 Amazon QuickSight User Guide The following screen appears. For the latest prices, see Amazon QuickSight pricing. 3. Be sure that you want to upgrade. Important You can't undo this action. Choose Upgrade to upgrade. The upgrade is instantaneous. Billing for the upgrade to your subscription is prorated for the month of upgrade. Upgrades to Amazon QuickSight users are also prorated. 4. (Optional) Downgrade users to readers: • Before you start, make sure to transfer any assets your users own that you want to keep. • Delete the users and add them |
amazon-quicksight-user-471 | amazon-quicksight-user.pdf | 471 | top left, choose Upgrade now. Upgrading your subscription 1719 Amazon QuickSight User Guide The following screen appears. For the latest prices, see Amazon QuickSight pricing. 3. Be sure that you want to upgrade. Important You can't undo this action. Choose Upgrade to upgrade. The upgrade is instantaneous. Billing for the upgrade to your subscription is prorated for the month of upgrade. Upgrades to Amazon QuickSight users are also prorated. 4. (Optional) Downgrade users to readers: • Before you start, make sure to transfer any assets your users own that you want to keep. • Delete the users and add them back to your subscription as readers. If you're using Active Directory, delete the authors, move them to the new reader group, then recreate them as readers in Amazon QuickSight. Upgrading your subscription 1720 Amazon QuickSight User Guide When you upgrade to Enterprise edition, your admin and author users retain their roles. Managing SPICE memory capacity SPICE (Super-fast, Parallel, In-memory Calculation Engine) is the robust in-memory engine that QuickSight uses. It's engineered to rapidly perform advanced calculations and serve data. In Enterprise edition, data stored in SPICE is encrypted at rest. For more information, see Data encryption in Amazon QuickSight. SPICE capacity is allocated separately per AWS Region. For each AWS account, SPICE capacity is shared by all the people using QuickSight in a single AWS Region. The other AWS Regions have no SPICE capacity unless you choose to purchase some. QuickSight administrators can view how much SPICE capacity you have in each AWS Region and how much of it is currently in use. Administrators can also purchase additional SPICE capacity or release unused SPICE capacity. You can only release SPICE capacity that isn't currently used by a dataset. Datasets in SPICE stay there until someone remove them from SPICE. To change that, you can either delete the datasets or change them so they aren't stored in SPICE. Purchasing or releasing SPICE capacity only affects the capacity for the currently selected AWS Region. Each AWS account can have a separate QuickSight subscription and can be used in multiple AWS Regions. For information about additional SPICE pricing, see QuickSight pricing. Before you make any changes to SPICE capacity, make sure that you're using the correct AWS account and AWS Region. It's possible to be using different AWS accounts or AWS Regions at the same time in different contexts, as follows: • If you open QuickSight using the http://quicksight.aws.amazon.com URL, QuickSight automatically selects your account and AWS Region. You can't view your AWS account from QuickSight. We recommend using a different method to open QuickSight when you want to work with SPICE capacity. • If you open QuickSight from the AWS Management Console, QuickSight opens in the account that you used to sign in to that console. However, it opens in the last AWS Region that you selected in QuickSight. The AWS Management Console and the QuickSight console each have an AWS Region selector that works independently from the other. Changing the selected AWS Region in the AWS console doesn't change the AWS Region in QuickSight. SPICE capacity 1721 Amazon QuickSight User Guide • If you use the AWS Command Line Interface (AWS CLI) to run QuickSight commands, make sure to provide the relevant AWS account for each QuickSight API operation you use. The AWS Region isn't always required, and if you don't provide it, the AWS CLI uses your default AWS Region from your AWS configuration. We recommend that you always explicitly provide the AWS Region, to make sure you apply the command to the correct AWS Region. You must be signed in as a QuickSight administrator to view or manage SPICE capacity. Topics • Finding your current AWS account and AWS Region • Viewing SPICE capacity and usage in an AWS Region • Hiding SPICE capacity labels • Purchasing SPICE capacity in an AWS Region • Turning on SPICE auto capacity purchasing • Releasing SPICE capacity in an AWS Region Finding your current AWS account and AWS Region To select the correct AWS account and AWS Region (console) 1. Open the AWS console, using the AWS account that you want to view SPICE information for. If you have only one AWS account, you can skip this step. You can verify the account number by following these steps: a. On the navigation bar at the top of the page, choose the account name or number at right. If a number displays, this might be your AWS account ID. b. Choose My Security Credentials to display your credential-related information and options. Your AWS account ID displays near the top of the page. To return to the original page, choose the AWS logo at upper left. 2. Open QuickSight by first entering "quicksight" into the Find Services search box. When the word QuickSight appears |
amazon-quicksight-user-472 | amazon-quicksight-user.pdf | 472 | account, you can skip this step. You can verify the account number by following these steps: a. On the navigation bar at the top of the page, choose the account name or number at right. If a number displays, this might be your AWS account ID. b. Choose My Security Credentials to display your credential-related information and options. Your AWS account ID displays near the top of the page. To return to the original page, choose the AWS logo at upper left. 2. Open QuickSight by first entering "quicksight" into the Find Services search box. When the word QuickSight appears following the search box, choose it from the list. 3. In QuickSight, open the profile menu by choosing your profile icon at top right. The AWS name of the AWS Region that QuickSight is using displays in the menu. SPICE capacity 1722 Amazon QuickSight User Guide The same AWS Region also displays in the URL, for example: https://us- east-1.quicksight.aws.amazon.com/sn/admin. If this is your URL, the profile menu displays the name N. Virginia. To switch AWS Regions, display the list of supported Regions by choosing the Region name from the profile menu. Then choose the Region that you want to use. Switching to a different AWS Region changes the SPICE usage information that you can view. It also changes the QuickSight assets that you can use, for example data sources and dashboards. Viewing SPICE capacity and usage in an AWS Region To view current SPICE capacity and usage (console) 1. Open QuickSight. Make sure that you're using the correct AWS account and AWS Region as described previously in Finding your current AWS account and AWS Region. 2. Open the administration page by choosing Manage QuickSight from your profile menu. 3. Choose SPICE capacity from the left navigation pane . The following information displays: • The Total SPICE capacity section displays the total amount of used and unused SPICE capacity. A bar graph shows how much of this storage space is in each of the following categories for this AWS account in the AWS Region that's currently selected in QuickSight: • Purchased SPICE capacity – This is the additional SPICE capacity. • SPICE capacity bundled with QuickSight – This is the total default capacity associated with your paid users. Hover over any section of the meter to see details on that capacity type. • The SPICE usage section displays the total amount of the used and unused SPICE capacity. A bar graph shows how much of this storage space is in each of the following categories for this AWS account in the AWS Region that's currently selected in QuickSight: • Used SPICE capacity – This is the used portion of the default SPICE capacity that you get for each user. • Unused SPICE capacity – This is the unused portion of the default SPICE capacity that you get for each user. • Releasable unused capacity – This is the purchased capacity that isn't in use, and so can be released to reduce costs. SPICE capacity 1723 Amazon QuickSight User Guide Hiding SPICE capacity labels QuickSight account admins can choose to hide the account-wide SPICE capacity usage and remaining size labels from QuickSight authors. This feature is available to all enterprise accounts that use custom permissions. For more information about custom permissions in Amazon QuickSight, see Customizing access to Amazon QuickSight capabilities. Use the following procedure to hide SPICE capacity usage from the QuickSight console. 1. Open the QuickSight console. 2. From any page in the QuickSight console, choose your profile name, and then choose Manage QuickSight. The Manage QuickSight menu is only available to QuickSight admins. If you are unable to acces this menu, contact your QuickSight account admin for assistance. 3. Choose Manage users, and then choose Manage permissions. 4. Edit or create a new custom permission. For Restrict access to, under Datasets, select Viewing account SPICE capacity. 5. When you are finished creating or changing the custom permission, chose Create or Update. After you create or update a custom permission to hide SPICE capacity usage, assign the new permission to users with the UpdateUser API. Purchasing SPICE capacity in an AWS Region To purchase more SPICE capacity (console) 1. Open QuickSight. Make sure that you're using the correct AWS account and AWS Region as described previously in Finding your current AWS account and AWS Region. 2. Open the administration page by choosing Manage QuickSight from your profile menu. 3. Choose SPICE capacity from the left navigation pane . 4. Choose the Purchase more capacity button. 5. Enter a number of gigabytes of SPICE capacity to purchase for the AWS Region that is currently selected in QuickSight. 6. To confirm your choice, choose Purchase SPICE capacity. To exit without making any changes, choose Cancel. SPICE capacity 1724 Amazon QuickSight User Guide |
amazon-quicksight-user-473 | amazon-quicksight-user.pdf | 473 | QuickSight. Make sure that you're using the correct AWS account and AWS Region as described previously in Finding your current AWS account and AWS Region. 2. Open the administration page by choosing Manage QuickSight from your profile menu. 3. Choose SPICE capacity from the left navigation pane . 4. Choose the Purchase more capacity button. 5. Enter a number of gigabytes of SPICE capacity to purchase for the AWS Region that is currently selected in QuickSight. 6. To confirm your choice, choose Purchase SPICE capacity. To exit without making any changes, choose Cancel. SPICE capacity 1724 Amazon QuickSight User Guide Turning on SPICE auto capacity purchasing Turn on SPICE auto capacity purchasing to allow Amazon QuickSight to automatically manage your QuickSight account's SPICE capacity. When you turn auto capacity purchasing on, QuickSight evaluates how much capacity is needed based on your account's usage. As your account uses more SPICE storage, automatically purchases SPICE capacity as needed on your behalf. This allows users to ingest data as needed without the need to estimate usage or manually purchase SPICE data. Auto capacity purchasing makes it easier for new customers, ISVs, and larger companies to directly access SPICE without needing to understand, track, or manually purchase their account's SPICE capacity. QuickSight admins can still purchase and release SPICE capacity manually. Auto capacity purchasing doesn't support auto-decrement. If users want to reduce their SPICE usage, capacity release must be done manually. By default, all new QuickSight accounts that are created in the console have auto capacity purchasing turned on in the region that their capacity is located. To turn on auto capacity purchasing for other regions, QuickSight account admins can manually turn on auto capacity from the SPICE capacity management page. By default, all new QuickSight accounts that were created with the QuickSight API and all existing QuickSight accounts have auto capacity purchasing turned off. To turn on auto capacity purchasing, QuickSight account admins can manually turn on auto capacity from the SPICE capacity management page. To turn SPICE capacity purchasing on or off 1. Open the QuickSight console. 2. From any page in the QuickSight console, choose your profile name, and then choose Manage QuickSight. The Manage QuickSight menu is only available to QuickSight admins. If you are unable to acces this menu, contact your QuickSight account admin for assistance. 3. Choose SPICE capacity. 4. On the SPICE Capacity page that opens, toggle the Auto-purchase capacity on, as shown in the image below. SPICE capacity 1725 Amazon QuickSight User Guide To turn auto capacity purchasing off, follow the procedure above and toggle Auto-purchase capacity off. When auto purchase capacity is turned off, ingestions or refreshes that exceed the account's SPICE capacity automatically fail. QuickSight admins can turn auto capacity pricing on or off at any time. If you turn auto capacity purchasing off after it's been in use, your account's current capacity becomes your account's purchased capacity. If your account has no ramining capacity when you turn auto purchase off, the next ingestion or refresh will fail. If your account already exceeds its SPICE capacity when you turn auto capacity purchasing on, QuickSight automatically matches your account's capacity to your current usage. After QuickSight matches your account's capacity, the auto-purchase logic starts. Releasing SPICE capacity in an AWS Region To release unused SPICE capacity (console) 1. Open QuickSight. Make sure that you're using the correct AWS account and AWS Region as described previously in Finding your current AWS account and AWS Region. 2. Open the administration page by choosing Manage QuickSight from your profile menu. 3. Choose SPICE capacity from the left navigation pane . 4. Choose Release unused purchased capacity. 5. Do one of the following: • To release all SPICE capacity from the AWS Region that is currently selected in QuickSight, choose Release all. SPICE capacity 1726 Amazon QuickSight User Guide • To release some of gigabytes of SPICE capacity from the AWS Region that is currently selected in QuickSight, enter the number of gigabytes to release. 6. To confirm your choice, choose Release SPICE capacity. To exit without making any changes, choose Cancel. Account settings Use this section to change the account-wide settings in Amazon QuickSight. To open your account settings 1. Choose the profile icon, and then select Manage QuickSight. 2. Click on Account settings. Topics • Changing your notification email • Manage Amazon Q in QuickSight data story personalization • Deleting your Amazon QuickSight subscription and closing the account Changing your notification email You can change the notification email address for access requests and service notifications. Use the following procedure to change your Amazon QuickSight notification email and to enable or disable IAM user access requests. To change your notification email and enable or disable IAM user access requests 1. Choose the profile icon, and then select Manage |
amazon-quicksight-user-474 | amazon-quicksight-user.pdf | 474 | settings 1. Choose the profile icon, and then select Manage QuickSight. 2. Click on Account settings. Topics • Changing your notification email • Manage Amazon Q in QuickSight data story personalization • Deleting your Amazon QuickSight subscription and closing the account Changing your notification email You can change the notification email address for access requests and service notifications. Use the following procedure to change your Amazon QuickSight notification email and to enable or disable IAM user access requests. To change your notification email and enable or disable IAM user access requests 1. Choose the profile icon, and then select Manage QuickSight. 2. Click on Account settings. 3. Under Notification email address, enter the email address you want to use. Choose whether to send IAM user access requests to the same email address. Toggle Enable IAM user access requests to this account for this setting. Manage account settings 1727 Amazon QuickSight User Guide Manage Amazon Q in QuickSight data story personalization QuickSight admins can opt out of personalized responses for all users in an account in the Security & permissions section of the QuickSight administration console. For more information about personalization in data stories, see Personalize data stories in Amazon QuickSight. Use the procedure below to turn off personalized responses for all users in an account. To opt out of personalization in data stories 1. Open the QuickSight console. 2. Choose the user icon at the top right, and then choose Manage QuickSight. 3. Choose Security & permissions. 4. Navigate to Amazon Q, and then choose Manage. 5. On the Manage personalization permissions for Amazon Q page that opens, turn the Personalized responses toggle off. Once you turn the Personalized responses toggle off, all new data stories that are created in the account are not personalized. Deleting your Amazon QuickSight subscription and closing the account The act of deleting Amazon QuickSight from your is immediate and final. Deletion removes every QuickSight asset on the AWS account you are using. It doesn't delete namespaces that you added. (The Default namespace is deleted automatically.) You can locate and delete namesspaces by using the API operations ListNamespaces and DeleteNamespace. You can terminate your Amazon QuickSight account from the Manage QuickSight menu or by using the API. To prevent someone from deleting a QuickSight user account accidentally or maliciously, QuickSight uses permissions, a switch for the Account termination protection setting, and a required confirmation word. After your account is deleted, you can create a new Amazon QuickSight account. The process doesn't take more than 15 minutes. The settings for edition and user authorization method on the new account can be the same or different. Before you can delete your QuickSight account, make sure of the following: • You're signed in using the IAM account or AWS root account that was used to create your Amazon QuickSight account. Manage account settings 1728 Amazon QuickSight User Guide • You understand that your AWS account is not deleted when you terminate your Amazon QuickSight account. To instead close your AWS account, see Closing an AWS account. • Terminating your account deletes all users, all uploaded data, and assets (for example, datasets, data sources, queries, dashboards, analyses, settings, and so on). To terminate your QuickSight account without the QuickSight UI 1. Sign in to AWS where you want to remove Amazon QuickSight. 2. Use this direct link to open the Amazon QuickSight Account termination screen. This approach works no matter which AWS Regions you use. To terminate your account by using the QuickSight UI 1. Choose your profile on the application bar, and then choose Manage QuickSight. 2. Use one of the following methods to open the Account termination screen. • Use this direct link to the screen. • Choose Account settings, Manage. Manage account settings 1729 Amazon QuickSight User Guide 3. On the Account termination page, confirm that you are viewing the correct QuickSight account by checking the name listed for account name. Manage account settings 1730 Amazon QuickSight User Guide 4. 5. Toggle off Account termination protection is on. Doing this enables the Delete account section. For Type "confirm" to delete this account, enter the word confirmation word shown on your screen. Permissions and access to account termination You need the following special permissions to terminate a QuickSight account. Without these permissions, you won't be able to terminate a QuickSight user account. Contact your account administrator for help. • You're a QuickSight administrator and have an Admin role in QuickSight. • You need permissions to run the following (except if you're the root admin user (IAM ) who added QuickSight) • quicksight:Unsubscribe Manage account settings 1731 Amazon QuickSight User Guide • ds:UnauthorizeApplication • ds:DeleteDirectory • ds:DescribeDirectories • quicksight:UpdateAccountSettings • To remove custom namespaces, you need permission to run the following API operations: • quicksight:ListNamespaces • quicksight:DeleteNamespace You |
amazon-quicksight-user-475 | amazon-quicksight-user.pdf | 475 | termination You need the following special permissions to terminate a QuickSight account. Without these permissions, you won't be able to terminate a QuickSight user account. Contact your account administrator for help. • You're a QuickSight administrator and have an Admin role in QuickSight. • You need permissions to run the following (except if you're the root admin user (IAM ) who added QuickSight) • quicksight:Unsubscribe Manage account settings 1731 Amazon QuickSight User Guide • ds:UnauthorizeApplication • ds:DeleteDirectory • ds:DescribeDirectories • quicksight:UpdateAccountSettings • To remove custom namespaces, you need permission to run the following API operations: • quicksight:ListNamespaces • quicksight:DeleteNamespace You don't need extra permissions to delete the default namespace. Warning Terminating your account is an instant action that cannot be undone by you or by AWS. Managing domains and embedding Applies to: Enterprise Edition Intended audience: Amazon QuickSight administrators In Amazon QuickSight Enterprise edition, you can embed QuickSight dashboards, visuals, consoles, and Q search bars in an app or web page. Domains that are going to host these embedded assets must be on an allow list, the list of approved domains for your Amazon QuickSight subscription. This requirement protects your data by preventing unapproved domains from hosting embedded dashboards. To embed a QuickSight dashboard, visual, console, or Q search bar to a web page or app, add approved domains to a static allow list in the QuickSight console. Alternatively, add them at runtime with the QuickSight API. Use the following sections to learn more about adding domains for embedded analytics. Topics • Allow listing static domains Domains and Embedding 1732 Amazon QuickSight User Guide • Allow listing domains at runtime with the QuickSight API Allow listing static domains You can add static domains to your allow list through the QuickSight console. All domains on your allow list (such as development, staging, and production) must be explicitly allowed, and they must use HTTPS. You can add up to 100 domains to the allow list. To embed a dashboard to a static domain: • Approve the hosting domains and subdomains for embedding. • Publish the dashboard. • Share the dashboard with users or groups so they can see the embedded version of it. Use the following procedure to view or edit the list of approved domains. To view or edit the list of approved domains 1. Choose the profile icon at top right. 2. Choose Manage QuickSight. You must be an Amazon QuickSight admin to access this screen. 3. Choose Domains and Embedding on the left. The domains that you can embed a dashboard in are listed at the bottom of the page. 4. (Optional) Add a new domain here by entering it in the Domain box. You can also choose Include subdomains to allow embedded dashboards on all subdomains. Choose Add to add the domain. You can edit or delete existing domain by choosing the icons next to each domain in the list at the bottom of the page. Make sure that you use a valid HTTPS URL. The following list shows examples of URLs that are valid for embedded dashboards that use a static domain: • https://example-1.com • https://www.アマゾンドメイン.jp • https://www.亚马逊域名.cn:1234 • https://111.222.33.44:1234 Domains and Embedding 1733 Amazon QuickSight • https://111.222.33.44 • http://localhost User Guide The following list shows examples of URLs that are not valid for embedded dashboards: • http://example • https://example.com.*.example-1.co.uk • https://co.uk • https://111.222.33.44.55:1234 • https://111.222.33.44.55 Allow listing domains at runtime with the QuickSight API You can add a domain at runtime to an allow list with the AllowedDomains parameter of a GenerateEmbedUrlForAnonymousUser or a GenerateEmbedUrlForRegisteredUser API call. The AllowedDomains parameter is an optional parameter. It grants you the option as a developer to override the static domains that are configured in the Manage QuickSight menu. You can list up to three domains or subdomains. Adding domains to the allow list at runtime also adds HTTP support for the domain localhost. The generated URL is then embedded in a developer's website. Only the domains that are listed in the parameter can access the embedded dashboard. To embed a dashboard to a domain at runtime, see Embedding with the Amazon QuickSight APIs. Make sure that you use a valid URL. The following list shows examples of URLs that are valid for embedded dashboards that use a runtime domain: • https://example-1.com • http://localhost • https://www.アマゾンドメイン.jp • https://*.sapp.amazon.com The following list shows examples of URLs that are not valid for embedded dashboards: • https://example.com.*.example-1.co.uk Domains and Embedding 1734 Amazon QuickSight • https://co.uk • https://111.222.33.44.55:1234 • https://111.222.33.44.55 User Guide For more information about embedded dashboards, see Embedded analytics for Amazon QuickSight. Supporting multitenancy with isolated namespaces Amazon QuickSight Enterprise edition supports multitenancy through namespaces. A QuickSight namespace is a logical container that you can use to organize clients, subsidiaries, teams, and so on. Namespaces can help you achieve the following goals: |
amazon-quicksight-user-476 | amazon-quicksight-user.pdf | 476 | are valid for embedded dashboards that use a runtime domain: • https://example-1.com • http://localhost • https://www.アマゾンドメイン.jp • https://*.sapp.amazon.com The following list shows examples of URLs that are not valid for embedded dashboards: • https://example.com.*.example-1.co.uk Domains and Embedding 1734 Amazon QuickSight • https://co.uk • https://111.222.33.44.55:1234 • https://111.222.33.44.55 User Guide For more information about embedded dashboards, see Embedded analytics for Amazon QuickSight. Supporting multitenancy with isolated namespaces Amazon QuickSight Enterprise edition supports multitenancy through namespaces. A QuickSight namespace is a logical container that you can use to organize clients, subsidiaries, teams, and so on. Namespaces can help you achieve the following goals: • You can allow the users of your QuickSight subscription to discover shared content and share with other users. At the same time, you can be sure that users in one namespace can't see or interact with users in another namespace. • You can securely isolate data and also support diverse workloads without adding additional AWS accounts. Access to data is still strictly controlled by AWS security features. Users can see assets (like data and dashboards) only if they have the correct resource permissions. Also, users who have permissions can't inadvertently expose content to people who outside of their namespace. For more information, see AWS security in Amazon QuickSight. • You can monitor data flows and usage reports, neatly partitioned by namespace. Categorizing data and reports by namespace can help simplify cost and security analysis. • After you've registered users into your namespace, there's no additional administrative complexity or overhead. • Namespaces are designed to span AWS Regions, so the use containment doesn't change even if a person signs in to a different AWS Region. Namespaces currently have the following limitations: • Custom namespaces—those that are not the default namespace—are only accessible to IAM Federated Single-Sign On users. • Use default namespaces instead of custom namespaces if you need to support the following: Multitenancy and namespaces 1735 Amazon QuickSight User Guide • Integrating your QuickSight account with IAM Identity Center. For more information on integrating your QuickSight account with IAM Identity Center, see Configure your Amazon QuickSight account with IAM Identity Center. • Password-based logins. • Credential-based Active Directory logins. • You can't transfer users directly from one namespace to another. You can choose to do some or all of this work programmatically. For more information, see the Amazon QuickSight API reference. At the bottom of the page of each API operation, there's a list of links to the same operation in the SDKs for other languages. To see what SDKs are available, see SDKs and toolkits in the AWS getting started resource center. • Namespaces are useful for isolating users and permissions, but not for sharing assets. Dashboards, datasets, and analyses can be shared with users in different namespaces. By default, users can't access items that exist in the same namespace by default, but gain access to specific assets when the asset is shared with them. If you don't have an existing AWS account or you need to sign up for QuickSight, read the following guidelines, then follow the applicable instructions in Signing up for an Amazon QuickSight subscription: • Sign up for Enterprise edition. • When asked which method you want to connect with, choose Role Based Federation (IAM). Currently, namespaces support only customers who use an AWS Identity and Access Management (IAM) role with a web identity federation. For more information, see Creating a role for a third-party Identity Provider (federation) • Complete the process of signing up. • Use the QuickSight CreateNamespace API operation to create one or more namespaces. • To start adding users, first follow the instructions in Setting up IdP federation using IAM and QuickSight. Then use the RegisterUser API operation to add users to the appropriate namespace. If you already signed up for Standard edition, you can easily upgrade your subscription to Enterprise edition. The person performing the upgrade must be a QuickSight user with administrator privileges. For more information, see Upgrading your Amazon QuickSight subscription from Standard edition to Enterprise edition. Multitenancy and namespaces 1736 Amazon QuickSight User Guide If you have an Enterprise edition subscription that you've been using for some time, it's also possible to migrate your users into namespaces. When you sign up for QuickSight and add users, all of them reside in the default namespace. All of the users can interact directly with each other and share data and dashboards with each other. To isolate your users from each other, you can create one or more additional namespaces. Important QuickSight assets and resources, including datasets, data sources, dashboards, analyses, and so on, exist outside of any namespace. They're visible only to users who have resource permissions granted to them. To implement namespaces, you use the following QuickSight API operations: • CreateNamespace • DescribeNamespace • ListNamespaces • DeleteNamespace |
amazon-quicksight-user-477 | amazon-quicksight-user.pdf | 477 | namespaces. When you sign up for QuickSight and add users, all of them reside in the default namespace. All of the users can interact directly with each other and share data and dashboards with each other. To isolate your users from each other, you can create one or more additional namespaces. Important QuickSight assets and resources, including datasets, data sources, dashboards, analyses, and so on, exist outside of any namespace. They're visible only to users who have resource permissions granted to them. To implement namespaces, you use the following QuickSight API operations: • CreateNamespace • DescribeNamespace • ListNamespaces • DeleteNamespace Namespaces are not supported in the Regions listed below: • af-south-1 Africa (Cape Town) • ap-southeast-3 Asia Pacific (Jakarta) • eu-south-1 Europe (Milan) • eu-central-2 Europe (Zurich) Note If you need to install the AWS CLI, see Installing the AWS CLI version 2 in the AWS Command Line Interface User Guide. To add users to a namespace, you use the RegisterUser API operation. Each namespace has a completely independent set of users. The user ARNs include the namespace qualifier to distinguish them, as shown in the following examples: Multitenancy and namespaces 1737 Amazon QuickSight User Guide • QuickSight considers these two entities to be different persons: • arn:aws:quicksight:us-east-1:111122223333:user/namespace-123/ username123 • arn:aws:quicksight:us-east-1:111122223333:user/namespace-456/ username123 • QuickSight considers these two entities to be the same person: • arn:aws:quicksight:us-east-1:111122223333:user/namespace-123/ username123 • arn:aws:quicksight:us-west-2:111122223333:user/namespace-123/ username123 When you use RegisterUser, you select an access level for each user. After a person's user name is assigned to one of the security cohorts, their access to the console and API is restricted. People using QuickSight can have a single access level, as follows: • Reader access, for read-only subscribers of a dashboard • Author access, for analysts and dashboard designers • Admin access, for QuickSight administrators To migrate existing users in one namespace to a different namespace Follow the procedure below to migrate existing users from one namespace to a different namespace. 1. Identify the users that you want to transfer to a different namespace by using the QuickSight user and group API operations. For more information, see API operations for controlling access in the Amazon QuickSight API reference. 2. Create users in the new namespace by using the RegisterUser API operation. Within a namespace, user names are unique. If a namespace user starts using the QuickSight console or API in a new AWS Region, that user is still constrained to the namespace that you added them to. Each namespace represents a user directory of an identity provider. As such, it originates in the primary AWS Region where QuickSight is set up. However, because the user directory is propagated globally in your To migrate existing users in one namespace to a different namespace 1738 Amazon QuickSight User Guide AWS account, the namespace is accessible from any AWS Region where your users are using QuickSight. 3. To identify the asset and resource permissions that the new namespace users need, use the QuickSight API operations associated with each type of asset (dashboards, datasets, and so on). For more information, see QuickSight API operations to control assets in the Amazon QuickSight API reference. For example, let's say you are focusing on dashboards. You can use ListDashboards to list all the dashboard IDs in your AWS account. Then, to determine which users or groups can access these dashboards, you can use DescribeDashboardPermissions on the result set generated by ListDashboards. If you need to identify specific versions of a dashboard, you can ListDashboardVersions for that. You can also collect information about the location of the data that's used in the dashboard with the data source and dataset API operations. For more information, see QuickSight API operations to control data resources in the Amazon QuickSight API reference. For more information about filtering API response output, see the SDK documentation for the language you're using. For information relating to the AWS Command Line Interface (AWS CLI), see Controlling command output from the AWS CLI in the AWS Command Line Interface User Guide. 4. For QuickSight assets and resources, copy the permissions that the source namespace user has for each asset. Then use, for example, UpdateDashboardPermissions to apply the same permissions to the target namespace user. Each asset type has its own separate set of API operations for controlling the permissions that users have to use it. For more information, see QuickSight API operations for asset and resource permissions in the Amazon QuickSight API reference. 5. When you are finished adding users and permissions, it's a good practice to allow some time for user acceptance testing. Doing this ensures that everyone is successfully using the new namespace. It also ensures that all assets and resources are accessible in the new namespace. After you're certain that you no longer need the original user names, you can begin to |
amazon-quicksight-user-478 | amazon-quicksight-user.pdf | 478 | asset type has its own separate set of API operations for controlling the permissions that users have to use it. For more information, see QuickSight API operations for asset and resource permissions in the Amazon QuickSight API reference. 5. When you are finished adding users and permissions, it's a good practice to allow some time for user acceptance testing. Doing this ensures that everyone is successfully using the new namespace. It also ensures that all assets and resources are accessible in the new namespace. After you're certain that you no longer need the original user names, you can begin to deprecate their permissions in the original namespace. Finally, when the users are ready, you can remove the unused group and user names in the source namespace. Do this in each AWS Region where your users were previously active. To migrate existing users in one namespace to a different namespace 1739 Amazon QuickSight User Guide Customizing the QuickSight console Using Amazon QuickSight, you can create a customized experience for people using either the AWS Management Console or QuickSight consoles embedded in your application. Currently, different options for customizing QuickSight are available separately in the console and the QuickSight API. Following, you can find information about the available options. The following customization options are currently available: • You can customize the welcome content QuickSight provides for new users: • You can accept or decline the sample assets. These assets include sample datasets and analyses that are added when a person signs in for the first time. • You can show or hide default introductory videos. These videos include the animation that displays for new users and also the tutorial videos shown on the QuickSight home page. • You can create and specify a default theme. • You can customize dashboard report emails, paginated report emails, and alert emails by editing the email template. Important All customizations apply only to the AWS Region that you are using in the API or that is selected in the QuickSight console. To check your Region setting, you can use one of the following procedures. To check your AWS Region on the QuickSight console 1. Choose your profile icon at upper right to open the menu. 2. View your current AWS Region, listed next to a location icon. 3. (Optional) Choose another AWS Region from the menu to change to that Region. Remember to change back after you are finished with customizations. Account customizations 1740 Amazon QuickSight User Guide To check your AWS Region using the AWS CLI • On the command line, enter the following command and press Enter to view the current settings. aws configure list To reconfigure your default Region, use the aws configure command. To keep your default Region, you can add the --region parameter to most CLI commands. Topics • Customizing QuickSight welcome content • Customizing report and alert emails • Setting a default theme for Amazon QuickSight analyses with the QuickSight APIs Customizing QuickSight welcome content To customize QuickSight welcome content 1. In Amazon QuickSight, choose your profile icon at upper right to open the menu. 2. Choose Manage QuickSight to open the administration page. 3. On the navigation pane, choose Account customization to open the customization options. 4. 5. Select the Show introductory videos check box to show the default tutorial videos and the introductory animation. Clear the check box to hide QuickSight videos and the intro animation for all users in your current region. Select the Create sample datasets and analyses check box to accept sample datasets and analyses for new users. Doing this also applies to existing users who open QuickSight in a new AWS Region. Clear the check box if you want to decline sample datasets and analyses. You can also provide your own versions of these to your users. 6. Choose Update. Any changes to customizations take about 10 minutes to appear. They apply only to your current AWS Region. Welcome content 1741 Amazon QuickSight User Guide Customizing report and alert emails Intended audience: System administrators and Amazon QuickSight administrators In Amazon QuickSight, you can customize how dashboard report emails and alert emails appear and behave for account users. You can customize the following components of emails: • The sender email address, including configuring a user-friendly name in place of the email address. For example: Sales, or Metrics emails. • The logo in the email. • The footer in the email. • Where the dashboard opens when recipients choose it from the email. To edit the custom email template, you must have the appropriate IAM permissions to create and update account customizations. If you plan to use a custom email address to send emails from, such as a company email address, you must have permissions to obtain Amazon SES identity attributes. For more information about the |
amazon-quicksight-user-479 | amazon-quicksight-user.pdf | 479 | emails: • The sender email address, including configuring a user-friendly name in place of the email address. For example: Sales, or Metrics emails. • The logo in the email. • The footer in the email. • Where the dashboard opens when recipients choose it from the email. To edit the custom email template, you must have the appropriate IAM permissions to create and update account customizations. If you plan to use a custom email address to send emails from, such as a company email address, you must have permissions to obtain Amazon SES identity attributes. For more information about the required permissions, and to see an example IAM policy, see IAM identity-based policies for Amazon QuickSight: customizing email report templates. Important All customizations apply only to the AWS Region and account that's selected in the QuickSight console. Use the following topics to edit the custom email template. Topics • Edit the email template • AWS CloudTrail logs Edit the email template Use the following procedure to edit the email template to customize emails in Amazon QuickSight. Report and alert emails 1742 Amazon QuickSight User Guide To edit the custom email template 1. In QuickSight, choose your user name at upper right, and then choose Manage QuickSight. 2. In the toolbar at left, choose Account customization. 3. On the Account customization page that opens, under Email report template, choose Update. Report and alert emails 1743 Amazon QuickSight User Guide The Customize email template page opens where you can edit the email template. 4. In Select "Sent from" email address, choose the "Sent from" option that you want to use. If you choose the Custom email address within the Simple Email Service (SES) AWS account #111122223333 option, use the following steps: a. For STEP 1, enter a verified SES email address in the text box, and then choose Verify. If you choose this option, QuickSight sends emails from the email address that you provide. To use a custom email address, you first confirm that the email address is a verified SES identity. Then you create a custom policy for that identity using the provided authorization policy code in SES, and then verify the authorization policy in QuickSight. You can also provide a user friendly display name (optional) for the email. For more information, see Verifying an email address in the Amazon Simple Email Service Developer Guide. b. For STEP 2, choose Copy authorization policy, and then choose Go to SES. Sign in to your SES account and create a custom policy for the email address that you verified in the previous step. You can paste the authorization policy code that you copied from QuickSight in the SES policy editor. Report and alert emails 1744 Amazon QuickSight User Guide For more information about creating identity policies in SES, see Creating a custom policy in the Amazon Simple Email Service Developer Guide. c. For STEP 3, choose Verify Authorization to verify that the SES identity has authorized QuickSight to send emails on its behalf. If it's verified, a verification message appears. d. (Optional) For STEP 4, enter a user-friendly name to display in the "Sent from" line in emails, and then choose Save. 5. In Select logo choose one of the following options. • Custom logo – The logo must be a JPG, JPEG, or PNG format and be no larger than 1 MB. After you upload a custom logo to QuickSight, the logo automatically resizes to a maximum height of 32px. • QuickSight logo • No logo 6. In Select where the dashboard opens, choose one of the following options: • Open in custom application – When you choose this option, users are redirected to your application when they choose the link to the dashboard in the email report. • To open the dashboard in your application, enter the URL for your application. You can use parameters in the URL. Any parameters that you add are replaced at runtime with the appropriate information. The following parameters are supported: <<$accountId>>, << $dashboardId>>, and <<$awsRegion>>. For example, let's say that you enter the following URL with parameters: https://www.example.com/analytics?account-id=<< $accountId>>&dashboard-id=<<$dashboardId>>®ion=<<$awsRegion>>. When the email report is sent to subscribers, QuickSight replaces the parameters with the appropriate values at runtime. The URL in the dashboard report email might be similar to the following: https://www.example.com/analytics?account-id=111222333&dashboard- id=28ab58b4-8b53-441c-b52b-bc475f620d7f®ion=us-west-2. Report and alert emails 1745 Amazon QuickSight User Guide • To enter a custom call to action for the dashboard link in the email, enter text for Enter custom call to action text. • Open in quicksight.aws.com – When you choose this option, users are redirected to QuickSight when they click on the link to the dashboard in the email report. • Hide dashboard link in email – When you choose this option, a link to view the dashboard isn't shown. 7. In |
amazon-quicksight-user-480 | amazon-quicksight-user.pdf | 480 | at runtime. The URL in the dashboard report email might be similar to the following: https://www.example.com/analytics?account-id=111222333&dashboard- id=28ab58b4-8b53-441c-b52b-bc475f620d7f®ion=us-west-2. Report and alert emails 1745 Amazon QuickSight User Guide • To enter a custom call to action for the dashboard link in the email, enter text for Enter custom call to action text. • Open in quicksight.aws.com – When you choose this option, users are redirected to QuickSight when they click on the link to the dashboard in the email report. • Hide dashboard link in email – When you choose this option, a link to view the dashboard isn't shown. 7. In Select footer, choose one of the following options: • Custom footer – Enter a custom footer in the text box. A custom email footer can contain up to 500 characters. • QuickSight footer • No footer AWS CloudTrail logs When you or someone in your account sets up an email template, the following snippet is added to the CloudTrail log as part of the eventName DescribeAccountCustomization and DescribeEmailCustomizationTemplate, and the eventCategory Management. DescribeAccountCustomization { "eventSource": "quicksight.amazonaws.com", "eventName": "DescribeAccountCustomization", "requestParameters": { "awsAccountId": "111222333", "resolved": false }, "responseElements": null, "eventCategory": "Management" } DescribeEmailCustomizationTemplate { "eventSource": "quicksight.amazonaws.com", "eventName": "DescribeEmailCustomizationTemplate", "requestParameters": { "awsAccountId": "111222333", "emailCustomizationTemplateId": "TemplateId" }, Report and alert emails 1746 Amazon QuickSight User Guide "responseElements": null, eventCategory": "Management" } When the template is saved, the following snippets are added as part of the eventName for CreateAccountCustomization and CreateEmailCustomizationTemplate. CreateAccountCustomization { "eventSource": "quicksight.amazonaws.com", "eventName": "CreateAccountCustomization", "requestParameters": { "accountCustomization": { "defaultEmailCustomizationTemplate": "arn:aws:quicksight:us- west-2:111222333:email-customization-template/template-id" }, "awsAccountId": "111222333" }, "responseElements": { "status": 201, "arn": "arn:aws:quicksight:us-west-2:111222333:customization/account/111222333", "awsAccountId": "111222333", "accountCustomization": { "defaultEmailCustomizationTemplate": "arn:aws:quicksight:us- west-2:111222333:email-customization-template/template-id" }, "requestId": "6b6f2ce8-584b-47cb-9f56-4273ab7061a6" }, "eventCategory": "Management" } CreateEmailCustomizationTemplate { "eventSource": "quicksight.amazonaws.com", "eventName": "CreateEmailCustomizationTemplate", "requestParameters": { "fromEmailAddressCurrentOption": "DEFAULT", "description": "", "awsAccountId": "111222333", "emailCustomizationTemplateId": "template-id", "name": "Email Customization Template", "dashboardLinkCurrentOption": "DEFAULT", "footerCurrentOption": "DEFAULT", Report and alert emails 1747 Amazon QuickSight User Guide "logoCurrentOption": "DEFAULT" }, "responseElements": { "emailCustomizationTemplateId": "template-id", "status": 200, "requestId": "17dea6c9-7811-4ee2-9c79-00c4d376a2c2", "arn": "arn:aws:quicksight:us-west-2:111222333:email-customization-template/ template-id" }, "eventCategory": "Management" } When the template is saved, the following snippets are added as part of the eventName for UpdateAccountCustomization and UpdateEmailCustomizationTemplate. UpdateAccountCustomization { "eventSource": "quicksight.amazonaws.com", "eventName": "UpdateAccountCustomization", "requestParameters": { "accountCustomization": { "defaultEmailCustomizationTemplate": "arn:aws:quicksight:us- west-2:111222333:email-customization-template/template-id" }, "awsAccountId": "111222333" }, "responseElements": { "status": 200, "arn": "arn:aws:quicksight:us-west-2:111222333:customization/account/111222333", "awsAccountId": "111222333", "accountCustomization": { "defaultEmailCustomizationTemplate": "arn:aws:quicksight:us- west-2:111222333:email-customization-template/template-id" }, "requestId": "6b6f2ce8-584b-47cb-9f56-4273ab7061a6" }, "eventCategory": "Management" } UpdateEmailCustomizationTemplate { "eventSource": "quicksight.amazonaws.com", "eventName": "UpdateEmailCustomizationTemplate", Report and alert emails 1748 User Guide Amazon QuickSight "requestParameters": { "fromEmailAddressCurrentOption": "DEFAULT", "description": "", "awsAccountId": "111222333", "emailCustomizationTemplateId": "template-id", "name": "Email Customization Template", "dashboardLinkCurrentOption": "DEFAULT", "footerCurrentOption": "DEFAULT", "logoCurrentOption": "DEFAULT" }, "responseElements": { "emailCustomizationTemplateId": "template-id", "status": 200, "requestId": "17dea6c9-7811-4ee2-9c79-00c4d376a2c2", "arn": "arn:aws:quicksight:us-west-2:111222333:email-customization-template/ template-id" }, "eventCategory": "Management" } Setting a default theme for Amazon QuickSight analyses with the QuickSight APIs To set a default theme by using the API 1. Identify the custom theme that you want to use as the default, and locate its theme ID. If you want to use one of the QuickSight starter themes, skip this step. To get the theme ID of a custom theme, use the ListThemes API operation for the Region where the theme is. Make sure that the theme is in the same Region with the users or groups that need to use it. The following example shows a shell script that uses the list-themes command in the AWS CLI. It sets the AWS account ID and the AWS Region as variables. If you previously used aws configure to set a default Region, adding the --region variable to your command overrides your default setting. #declare variables awsacct1='111122223333' region='us-west-2' Default analysis theme (CLI) 1749 Amazon QuickSight User Guide aws quicksight list-themes \ --region $region \ --aws-account-id $awsacct1 \ --type 'CUSTOM' 2. Use the ListUsers or ListGroups API operation to collect the Amazon Resource Names (ARNs) for users or groups that need to use the theme as a default. You need only the top-level ARN. If all your users are part of the same group, use the group ARN. For more information on QuickSight ARNs, see ARN formats in the Amazon QuickSight API Reference. 3. If you're using a custom theme, grant access to the theme for the ARNs that you collected in the previous step. If you're using a starter theme, skip this step because all users have access to starter themes. The following example shows a shell script that uses the update-theme-permissions command The grant-permissions parameter is shown using shorthand syntax. You can use JSON or YAML instead. For more information, see Specifying parameter values in the AWS Command Line Interface User Guide. #declare variables awsacct1='111122223333' namespace='default' region='us-west-2' theme-id='bdb844d0-0fe9-4d9d-b520-0fe602d93639' #Find this with list-themes aws quicksight update-theme-permissions \ #Specify region if necessary: --region $region \ --aws-account-id $awsacct1 \ --theme-id $theme-id \ --grant-permissions Principal="arn:aws:quicksight:$region:$awsacct1:group/$namespace/ QuickSight_Group_Name",Actions="quicksight:DescribeTheme","quicksight:ListThemeVersions","quicksight:ListThemeAliases","quicksight:DescribeThemeAlias" 4. Assign the theme as the default for the same ARN or ARNs. #declare variables awsacct1='111122223333' namespace='default' region='us-west-2' theme-id='bdb844d0-0fe9-4d9d-b520-0fe602d93639' Default analysis theme (CLI) 1750 Amazon QuickSight |
amazon-quicksight-user-481 | amazon-quicksight-user.pdf | 481 | starter themes. The following example shows a shell script that uses the update-theme-permissions command The grant-permissions parameter is shown using shorthand syntax. You can use JSON or YAML instead. For more information, see Specifying parameter values in the AWS Command Line Interface User Guide. #declare variables awsacct1='111122223333' namespace='default' region='us-west-2' theme-id='bdb844d0-0fe9-4d9d-b520-0fe602d93639' #Find this with list-themes aws quicksight update-theme-permissions \ #Specify region if necessary: --region $region \ --aws-account-id $awsacct1 \ --theme-id $theme-id \ --grant-permissions Principal="arn:aws:quicksight:$region:$awsacct1:group/$namespace/ QuickSight_Group_Name",Actions="quicksight:DescribeTheme","quicksight:ListThemeVersions","quicksight:ListThemeAliases","quicksight:DescribeThemeAlias" 4. Assign the theme as the default for the same ARN or ARNs. #declare variables awsacct1='111122223333' namespace='default' region='us-west-2' theme-id='bdb844d0-0fe9-4d9d-b520-0fe602d93639' Default analysis theme (CLI) 1750 Amazon QuickSight User Guide aws quicksight create-account-customization \ #Specify region if necessary: --region $region \ --aws-account-id $awsacct1 \ --namespace $namespace \ --account-customization DefaultTheme="arn:aws:quicksight:$region:$awsacct1:theme/$theme-id" Currently, there are three starter themes: Classic, Midnight, and Seaside. Their ARNs are the capitalized spelling of their theme name. If you are using a starter theme instead of a custom theme, use one of the following theme ARNs: • arn:aws:quicksight::aws:theme/CLASSIC • arn:aws:quicksight::aws:theme/MIDNIGHT • arn:aws:quicksight::aws:theme/SEASIDE • arn:aws:quicksight::aws:theme/RAINIER Amazon QuickSight brand customization Amazon QuickSight allows account admins to customize their application's branding and visual theme to align with their organization's guidelines. This customization includes the following visual elements to create a cohesive look and feel across all non-administrative QuickSight console pages, schedules, alerts, and email reports. • Logo • Favicon • Associated alt text for visual assets The following list shows the different areas customizable theme colors are grouped into. Brand colors • Global navigation bar colors are applied to the topmost bar in the QuickSight UI and include the company logo that is diaplayed in the standard and embedded QuickSight consoles. • Application bar colors are applied to the secondary navigation bar that contains contextual actions. Amazon QuickSight brand customization 1751 Amazon QuickSight Interaction colors User Guide • Accent colors are applied to interactive elements like buttons, borders, and icons. Surface colors • Primary colors are applied to high-emphasis surfaces like the homepage background and text. • Secondary colors are applied to practical surfaces like borders, backgrounds, and form fields. Secondary colors are used alongside primary colors. Status colors • Success colors are applied to success messages. • Danger colors are applied to error messages. • Info colors are applied to informational messages. • Warning colors are applied to warning messages. Data visualization colors • Dimension colors are used to identify associations between data columns that share the same role. • Measure colors are used to idenfity metrics or measured values. Use the following sections to get started with brand customization in Amazon QuickSight. Topics • Permisisons for QuickSight brand customization • Create a custom brand in Amazon QuickSight Permisisons for QuickSight brand customization To set up a brand, you must be granted an Admin role through IAM Identity Center or IAM. Admins whose roles are granted to them within QuickSight can't create brands. To learn more about integrating your account with IAM Identity Center, see Configure your Amazon QuickSight account with IAM Identity Center. Permissions 1752 Amazon QuickSight User Guide Admin users can only manage brands that are in the same capacity Region as their account. The IAM role that you use to create a brand in QuickSight must contain quicksight:* or granular action permissions to manage brands in the admin console. The following granular permissions are required for admins to work with QuickSight brands: • quicksight:CreateBrand • quicksight:UpdateBrand • quicksight:DescribeBrand • quicksight:DescribeBrandPublishedVersion • quicksight:UpdateBrandPublishedVersion • quicksight:DeleteBrand • quicksight:ListBrands • quicksight:UpdateBrandAssignment • quicksight:DescribeBrandAssignment • quicksight:DeleteBrandAssignment After you confirm that your Admin role contains the required permissions, you can create a custom brand in the QuickSight admin console. Create a custom brand in Amazon QuickSight Use the following procedure to create a custom brand in Amazon QuickSight. 1. Open the QuickSight console. 2. Choose the user icon at the top right, and then choose Manage QuickSight. 3. Choose Customize application. 4. On the Customize application page that opens, choose ADD BRAND. The Brand settings page opens. 5. Navigate to the Brand Info section. 6. 7. For Brand name, enter a name for the brand. The brand name can contain up to 512 characters. (Optional)For Brand description, enter a description for the custom brand. The brand description can contain up to 512 characters. Create a brand 1753 Amazon QuickSight User Guide 8. Navigate to the Logo section shown in the following image. 9. For Primary, choose the ellipsis (three dots) next to the primaty icon, and then choose Replace image. 10. In the Choose image pop up that opens, perform one of the following actions: a. Drag and drop image into the Drag an image here box. b. Choose Select a file to select a file from your computer. c. Enter a public URL or Amazon S3 URI in the text bar. The image that you choose must be a |
amazon-quicksight-user-482 | amazon-quicksight-user.pdf | 482 | to 512 characters. Create a brand 1753 Amazon QuickSight User Guide 8. Navigate to the Logo section shown in the following image. 9. For Primary, choose the ellipsis (three dots) next to the primaty icon, and then choose Replace image. 10. In the Choose image pop up that opens, perform one of the following actions: a. Drag and drop image into the Drag an image here box. b. Choose Select a file to select a file from your computer. c. Enter a public URL or Amazon S3 URI in the text bar. The image that you choose must be a .jpeg, .png, or .svg format and can't exceed 1MB. When you are finished choosing an image, choose Apply. 11. For Favicon, choose the ellipsis (three dots) next to the favicon, and then choose Replace image. 12. In the Choose image pop up that opens, perform one of the following actions: a. Drag and drop image into the Drag an image here box. b. Choose Select a file to select a file from your computer. c. Enter a public URL or Amazon S3 URI in the text bar. The image that you choose must be a .jpeg, .png, or .svg format and can't exceed 1MB. When you are finished choosing an image, choose Apply. 13. (Optional)For Alt text, enter alt text to display with the logo. The alt text can contain up to 512 characters. 14. To make changes to the theme colors of the brand, navigate to the Appearance pane on the left and choose Theme. Create a brand 1754 Amazon QuickSight User Guide 15. The Theme settings page appears and displays all parts of a QuickSight theme that can be customized. The following image shows the configuration settings of the global navigation bar. 16. To change the background color of an area, navigate to the item that you want to change and choose the Background color swatch. 17. In the Custom color pop up that appears, choose a color from the color gradient or enter a hex code value in the HEX bar, and then choose APPLY. 18. To change the foreground color of an area, navigate to the item that you want to change and choose the Foreground color swatch. 19. In the Custom color pop up that appears, choose a color from the color gradient or enter a hex code value in the HEX bar, and then choose APPLY. 20. When you are finished configuring a custom brand, choose PUBLISH to publish and apply the brand customization to all QuickSight user accounts. It If you don' want to publish the brand, choose SAVE to save the brand for later. When you finish creating a brand in QuickSight, the new brand appears in the brands table on the Customize application page of the QuickSight admin console. The Status column of the brands table indicates which brand is currently published to the QuickSight account. To make changes to a custom brand, locate the brand that you want to change in the brands table, choose the ellipsis (three dots) icon in the Actions column, and then choose Publish, Edit, or Delete. The image below shows a brand entry located in the brands table. Once you publish a brand to QuickSight, it can take up to 10 minutes for the new brand to propagate across all user accounts. Tracking AWS account cost and usage data with Billing and Cost Management and Amazon QuickSight Applies to: Enterprise Edition Tracking cost and usage data 1755 Amazon QuickSight User Guide With Billing and Cost Management, you can visualize your AWS account's billing and cost management data with a pre-built cost and usage dashboard that's powered by Amazon QuickSight. For more information about creating a cost and usage dashboard, see Creating a cost and usage dashboard in the AWS Billing User Guide Tracking cost and usage data 1756 Amazon QuickSight User Guide AWS security in Amazon QuickSight Amazon QuickSight provides a secure platform that enables you to distribute dashboards and insights to tens of thousands of users, with multiple-region availability and built-in redundancy. Cloud security at AWS is the highest priority. As an AWS customer, you benefit from a data center and network architecture that is built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. The effectiveness of our security is regularly tested and verified by third-party auditors as part of the AWS compliance programs. To learn about the compliance programs that apply to Amazon QuickSight, see |
amazon-quicksight-user-483 | amazon-quicksight-user.pdf | 483 | is built to meet the requirements of the most security-sensitive organizations. Security is a shared responsibility between AWS and you. The shared responsibility model describes this as security of the cloud and security in the cloud: • Security of the cloud – AWS is responsible for protecting the infrastructure that runs AWS services in the AWS Cloud. AWS also provides you with services that you can use securely. The effectiveness of our security is regularly tested and verified by third-party auditors as part of the AWS compliance programs. To learn about the compliance programs that apply to Amazon QuickSight, see AWS Services in Scope by Compliance Program. • Security in the cloud – Your responsibility is determined by the AWS service that you use. You are also responsible for other factors, including the sensitivity of your data, your organization’s requirements, and applicable laws and regulations. This documentation helps you understand how to apply the shared responsibility model when using Amazon QuickSight. The following topics show you how to configure Amazon QuickSight to meet your security and compliance objectives. You also learn how to use other AWS services that can help you to monitor and secure your Amazon QuickSight resources. Amazon QuickSight enables you to manage your users and content using a comprehensive set of security features. These include role-based access control, Microsoft Active Directory integration, AWS CloudTrail auditing, single sign-on using AWS Identity and Access Management (IAM) and third-party solutions, private VPC subnets, and data backup. Amazon QuickSight can also support FedRAMP, HIPAA, PCI DSS, ISO, and SOC compliance to help you meet industry-specific or regulatory requirements. Note that data is not co-mingled during caching. Data protection in Amazon QuickSight The AWS shared responsibility model applies to data protection in Amazon QuickSight. As described in this model, AWS is responsible for protecting the global infrastructure that runs all Data protection 1757 Amazon QuickSight User Guide of the AWS Cloud. You are responsible for maintaining control over your content that is hosted on this infrastructure. You are also responsible for the security configuration and management tasks for the AWS services that you use. For more information about data privacy, see the Data Privacy FAQ. For information about data protection in Europe, see the AWS Shared Responsibility Model and GDPR blog post on the AWS Security Blog. For data protection purposes, we recommend that you protect AWS account credentials and set up individual users with AWS IAM Identity Center or AWS Identity and Access Management (IAM). That way, each user is given only the permissions necessary to fulfill their job duties. We also recommend that you secure your data in the following ways: • Use multi-factor authentication (MFA) with each account. • Use SSL/TLS to communicate with AWS resources. We require TLS 1.2 and recommend TLS 1.3. • Set up API and user activity logging with AWS CloudTrail. For information about using CloudTrail trails to capture AWS activities, see Working with CloudTrail trails in the AWS CloudTrail User Guide. • Use AWS encryption solutions, along with all default security controls within AWS services. • Use advanced managed security services such as Amazon Macie, which assists in discovering and securing sensitive data that is stored in Amazon S3. • If you require FIPS 140-3 validated cryptographic modules when accessing AWS through a command line interface or an API, use a FIPS endpoint. For more information about the available FIPS endpoints, see Federal Information Processing Standard (FIPS) 140-3. We strongly recommend that you never put confidential or sensitive information, such as your customers' email addresses, into tags or free-form text fields such as a Name field. This includes when you work with Amazon QuickSight or other AWS services using the console, API, AWS CLI, or AWS SDKs. Any data that you enter into tags or free-form text fields used for names may be used for billing or diagnostic logs. If you provide a URL to an external server, we strongly recommend that you do not include credentials information in the URL to validate your request to that server. Topics • Data encryption in Amazon QuickSight • Encrypting Amazon QuickSight SPICE datasets with AWS Key Management Service customer- managed keys • Inter-network traffic privacy in Amazon QuickSight Data protection 1758 Amazon QuickSight • Accessing data sources User Guide Data encryption in Amazon QuickSight Amazon QuickSight uses the following data encryption features: • Encryption at rest • Encryption in transit • Key management You can find more details about data encryption at rest and data encryption in transit in the following topics. For more information about key management in QuickSight see Encrypting Amazon QuickSight SPICE datasets with AWS Key Management Service customer-managed keys. Topics • Encryption at rest • Encryption in transit Encryption at rest Amazon QuickSight securely stores your Amazon QuickSight metadata. This includes the |
amazon-quicksight-user-484 | amazon-quicksight-user.pdf | 484 | Amazon QuickSight Data protection 1758 Amazon QuickSight • Accessing data sources User Guide Data encryption in Amazon QuickSight Amazon QuickSight uses the following data encryption features: • Encryption at rest • Encryption in transit • Key management You can find more details about data encryption at rest and data encryption in transit in the following topics. For more information about key management in QuickSight see Encrypting Amazon QuickSight SPICE datasets with AWS Key Management Service customer-managed keys. Topics • Encryption at rest • Encryption in transit Encryption at rest Amazon QuickSight securely stores your Amazon QuickSight metadata. This includes the following: • Amazon QuickSight user data, including Amazon QuickSight user names, email addresses, and passwords. Amazon QuickSight administrators can view user names and emails, but each user's password is completely private to each user. • Minimal data necessary to coordinate user identification with your Microsoft Active Directory or identity federation implementation (Federated Single Sign-On (IAM Identity Center) through Security Assertion Markup Language 2.0 (SAML 2.0)). • Data source connection data • Amazon QuickSight data source credentials (username and password) or OAuth tokens to establish a data source connection are encrypted with the customers default CMK when customer registers a CMK with QuickSight. If the customer does not register a CMK with QuickSight, we will continue to encrypt the information using a QuickSight owned AWS KMS key. • Names of your uploaded files, data source names, and data set names. • Statistics that Amazon QuickSight uses to populate machine learning (ML) insights Data encryption 1759 Amazon QuickSight User Guide Amazon QuickSight securely stores your Amazon QuickSight data. This includes the following: • Data-at-rest in SPICE is encrypted using hardware block-level encryption with AWS-managed keys. • Data-at-rest other than SPICE is encrypted using Amazon-managed KMS keys. This includes the following: • Email reports • Sample value for filters When you delete a user, all of that user's metadata is permanently deleted. If you don't transfer that user's Amazon QuickSight objects to another user, all of the deleted user's Amazon QuickSight objects (data sources, datasets, analyses, and so on) are also deleted. When you unsubscribe from Amazon QuickSight, all metadata and any data you have in SPICE is completely and permanently deleted. Encryption in transit Amazon QuickSight supports encryption for all data transfers. This includes transfers from the data source to SPICE, or from SPICE to the user interface. However, encryption isn't mandatory. For some databases, you can choose whether transfers from the data source are encrypted or not. Amazon QuickSight secures all encrypted transfers by using Secure Sockets Layer (SSL). Encrypting Amazon QuickSight SPICE datasets with AWS Key Management Service customer-managed keys QuickSight enables you to encrypt your SPICE datasets with the keys you have stored in AWS Key Management Service. This provides you with the tools to audit access to data and satisfy regulatory security requirements. If you need to do so, you have the option to immediately lock down access to your data by revoking access to AWS KMS keys. All data access to encrypted resources in QuickSight is logged in AWS CloudTrail. Administrators or auditors can trace data access in CloudTrail to identify when and where data was accessed. To create customer-managed keys (CMKs), you use AWS Key Management Service (AWS KMS) in the same AWS account and AWS Region as the Amazon QuickSight resource. A QuickSight administrator can then use a CMK to encrypt SPICE datasets and control access. Encrypting SPICE datasets with AWS KMS customer-managed keys 1760 Amazon QuickSight User Guide You can create and manage CMKs in the QuickSight console or with the QuickSight APIs. For more information about creating and managing CMKs with the QuickSight APIs, see Key management operations. The following rules apply to using CMKs with resources: • Amazon QuickSight doesn't support asymmetric AWS KMS keys. • You can have multiple CMKs and one default CMK per AWS account per AWS Region. • The key that is currently the default CMK is automatically used to encrypt new SPICE datasets. • By default, QuickSight resources are encrypted with QuickSight–native encryption strategies. Note If you use AWS Key Management Service with Amazon QuickSight, you are billed for access and maintenance as described in the AWS Key Management Service Pricing page. In your billing statement, the costs are itemized under AWS KMS and not under QuickSight. All non-customer managed keys associated with Amazon QuickSight are managed by AWS. Database server certificates that are not managed by AWS are the responsibility of the customer and should be signed by a trusted CA. For more information, see Network and database configuration requirements. Use the following topics to learn more about using CMKs with Amazon QuickSight. Topics • Add a CMK to your account • Verify the key used by a SPICE dataset • Changing the default CMK • |
amazon-quicksight-user-485 | amazon-quicksight-user.pdf | 485 | Key Management Service Pricing page. In your billing statement, the costs are itemized under AWS KMS and not under QuickSight. All non-customer managed keys associated with Amazon QuickSight are managed by AWS. Database server certificates that are not managed by AWS are the responsibility of the customer and should be signed by a trusted CA. For more information, see Network and database configuration requirements. Use the following topics to learn more about using CMKs with Amazon QuickSight. Topics • Add a CMK to your account • Verify the key used by a SPICE dataset • Changing the default CMK • Removing CMK encryption on your QuickSight account • Auditing CMK usage in CloudTrail • Revoking access to a CMK-encrypted dataset • Recovering an encrypted SPICE dataset Encrypting SPICE datasets with AWS KMS customer-managed keys 1761 Amazon QuickSight Add a CMK to your account User Guide Before you begin, make sure that you have an IAM role that grants the admin user access to the Amazon QuickSight admin key management console. For more information on the required permissions, see IAM identity-based policies for Amazon QuickSight: using the admin key management console. You can add keys that already exist in AWS KMS to your QuickSight account, so that you can encrypt your SPICE datasets. Keys that you add only affect new datasets created in SPICE. If you have an existing SPICE dataset that you want to encrypt, perform a full refresh on the dataset to encrypt it with the default CMK. To learn more about how you can create a key to use in QuickSight, see the AWS Key Management Service Developer Guide. To add a new CMK to your QuickSight account. 1. On the QuickSight start page, choose Manage QuickSight, and then choose KMS keys. 2. On the KMS keys page, choose Manage. The KMS keys dashboard opens. Encrypting SPICE datasets with AWS KMS customer-managed keys 1762 Amazon QuickSight User Guide 3. On the KMS Keys dashboard, choose Select key. 4. On the Select key pop-up box, choose Key to open the list. Then, select the key that you want to add. If your key isn't in the list, you can manually enter the key's ARN. Encrypting SPICE datasets with AWS KMS customer-managed keys 1763 Amazon QuickSight User Guide 5. (Optional) Select the Use as default encryption key for all new SPICE datasets in this QuickSight account to set the selected key as your default key. A blue badge appears next to the default key to indicate its status. When you choose a default key, all new SPICE datasets that are created in the Region that hosts your QuickSight account are encrypted with the default key. 6. (Optional) Add more keys by repeating the previous steps in this procedure. While you can add as many keys as you want, you can only have one default key at one time. Note To use a specific key for a existing dataset, switch the account default key to the new key, then run a full refresh on the SPICE dataset. Verify the key used by a SPICE dataset When a key is used, an audit log is created in AWS CloudTrail. You can use the log to track the key's usage. If you need to know which key a SPICE dataset is encrypted by, you can find this information in CloudTrail. Verify the CMK that's currently used by a SPICE dataset 1. Navigate to your CloudTrail log. For more information, see Logging QuickSight information with AWS CloudTrail. 2. Locate the most recent grant events for the SPICE dataset, using the following search arguments: • The event name (eventName) contains Grant. • The request parameters requestParameters contain the QuickSight ARN for the dataset. Encrypting SPICE datasets with AWS KMS customer-managed keys 1764 Amazon QuickSight User Guide { "eventVersion": "1.08", "userIdentity": { "type": "AWSService", "invokedBy": "quicksight.amazonaws.com" }, "eventTime": "2022-10-26T00:11:08Z", "eventSource": "kms.amazonaws.com", "eventName": "CreateGrant", "awsRegion": "us-west-2", "sourceIPAddress": "quicksight.amazonaws.com", "userAgent": "quicksight.amazonaws.com", "requestParameters": { "constraints": { "encryptionContextSubset": { "aws:quicksight:arn": "arn:aws:quicksight:us- west-2:111122223333:dataset/12345678-1234-1234-1234-123456789012" } }, "retiringPrincipal": "quicksight.amazonaws.com", "keyId": "arn:aws:kms:us- west-2:111122223333:key/87654321-4321-4321-4321-210987654321", "granteePrincipal": "quicksight.amazonaws.com", "operations": [ "Encrypt", "Decrypt", "DescribeKey", "GenerateDataKey" ] }, .... } 3. Depending on the event type, one of the following applies: CreateGrant – You can find the most recently used CMK in the key ID (keyID) for the last CreateGrant event for the SPICE dataset. RetireGrant – If latest CloudTrail event of the SPICE datasets is RetireGrant, there is no key ID and the resource is no longer CMK encrypted. Encrypting SPICE datasets with AWS KMS customer-managed keys 1765 Amazon QuickSight Changing the default CMK User Guide You can change the default key to another key that already exists in the KMS keys dashboard. When you change the default key, all new SPICE datasets are encrypted on the new key. The new default key changes how new SPICE datasets |
amazon-quicksight-user-486 | amazon-quicksight-user.pdf | 486 | used CMK in the key ID (keyID) for the last CreateGrant event for the SPICE dataset. RetireGrant – If latest CloudTrail event of the SPICE datasets is RetireGrant, there is no key ID and the resource is no longer CMK encrypted. Encrypting SPICE datasets with AWS KMS customer-managed keys 1765 Amazon QuickSight Changing the default CMK User Guide You can change the default key to another key that already exists in the KMS keys dashboard. When you change the default key, all new SPICE datasets are encrypted on the new key. The new default key changes how new SPICE datasets are encrypted. However, existing datasets continue to use the previous default key until the dataset is fully refreshed. To encrypt the dataset with a new default key, perform a full refresh on the dataset. To change the default key to an existing key 1. On the QuickSight start page, choose Manage QuickSight, and then choose KMS keys. 2. On the AWS KMS keys page, choose MANAGE to open the KMS keys dashboard. 3. Navigate to the key that you want to set as your new default. Choose Actions (three dots) on the row of the key that you want to open the key's menu. 4. Choose Set as default. The selected key is now your default key. Removing CMK encryption on your QuickSight account You can remove the default key to disable SPICE dataset encryption in your QuickSight account. Removing the key prevents new resources from encrypting on a CMK. To remove CMK encryption for new SPICE datasets 1. On the QuickSight start page, choose Manage QuickSight, and then choose KMS keys. 2. On the KMS keys page, choose Manage to open the KMS keys dashboard. 3. Choose Actions (three dots) on the row of the default key, and then choose Delete. 4. In the pop-up box that appears, choose Remove. Encrypting SPICE datasets with AWS KMS customer-managed keys 1766 Amazon QuickSight User Guide After you delete the default key from your account, QuickSight stops encrypting new SPICE datasets. Any existing encrypted datasets stay encrypted until a full refresh occurs. Auditing CMK usage in CloudTrail You can audit your account's CMK usage in AWS CloudTrail. To audit your key usage, log in to your AWS account, open CloudTrail, and choose Event history. Revoking access to a CMK-encrypted dataset You can revoke access to your CMK-encrypted SPICE datasets. When you revoke access to a key that is used to encrypt a dataset, access to the dataset is denied until you undo the revoke. The following methods are examples of how you can revoke access: • Turn off the key in AWS KMS. Encrypting SPICE datasets with AWS KMS customer-managed keys 1767 Amazon QuickSight User Guide • Add a Deny policy to your QuickSight AWS KMS policy in IAM. Use the following procedure to revoke access to your CMK-encrypted datasets in AWS KMS. To turn off a CMK in AWS Key Management Service 1. 2. Log in to your AWS account, open AWS KMS, and choose Customer managed keys. Select the key that you want to turn off. 3. Open the Key actions menu and choose Disable. To prevent further use of the CMK, you could add a Deny policy in AWS Identity and Access Management (IAM). Use "Service": "quicksight.amazonaws.com" as the principal and the ARN of the key as the resource. Deny the following actions: "kms:Encrypt", "kms:Decrypt", "kms:ReEncrypt*", "kms:GenerateDataKey*", "kms:DescribeKey". Important After you revoke access by using any method, it can take up to 15 minutes for the SPICE dataset to become inaccessible. Recovering an encrypted SPICE dataset To recover a SPICE dataset while its access is revoked 1. Restore access to the CMK. Usually, this is enough to recover the dataset. 2. Test the SPICE dataset to see if you can see the data. Encrypting SPICE datasets with AWS KMS customer-managed keys 1768 Amazon QuickSight User Guide 3. (Optional) If the data is not fully recovered, even after you restored its access to the CMK, perform a full refresh on the dataset. Inter-network traffic privacy in Amazon QuickSight To use Amazon QuickSight, users need access to the internet. They also need access to a compatible browser or a mobile device with the Amazon QuickSight mobile app installed. They don't need access to the data sources they want to analyze. This access is handled inside Amazon QuickSight. User connections to Amazon QuickSight are protected through the use of SSL. So that users can access Amazon QuickSight, allow access to HTTPS and Web Sockets Secure (wss://) protocol. You can use a Microsoft AD connector and single sign-on (IAM Identity Center) in a corporate network environment. You can further restrict access through the identity provider. Optionally, you can also use MFA. Amazon QuickSight accesses data sources by using connection information supplied by the |
amazon-quicksight-user-487 | amazon-quicksight-user.pdf | 487 | with the Amazon QuickSight mobile app installed. They don't need access to the data sources they want to analyze. This access is handled inside Amazon QuickSight. User connections to Amazon QuickSight are protected through the use of SSL. So that users can access Amazon QuickSight, allow access to HTTPS and Web Sockets Secure (wss://) protocol. You can use a Microsoft AD connector and single sign-on (IAM Identity Center) in a corporate network environment. You can further restrict access through the identity provider. Optionally, you can also use MFA. Amazon QuickSight accesses data sources by using connection information supplied by the data source owner in Amazon QuickSight. Connections are protected both between Amazon QuickSight and on-premises applications and between Amazon QuickSight and other AWS resources within the same AWS Region. For connections to any source, the data source must allow connections from Amazon QuickSight. Traffic between service and on-premises clients and applications You have two connectivity options between your private network and AWS: • An AWS Site-to-Site VPN connection. For more information, see What is AWS site-to-site VPN? • An AWS Direct Connect connection. For more information, see What is AWS direct connect? If you are using AWS API operations to interact with Amazon QuickSight through the network, clients must support Transport Layer Security (TLS) 1.0. We recommend TLS 1.2. Clients must also support cipher suites with Perfect Forward Secrecy (PFS), such as Ephemeral Diffie-Hellman (DHE) or Elliptic Curve Diffie-Hellman Ephemeral (ECDHE). Most modern systems such as Java 7 and later support these modes. You must sign requests using an access key ID and a secret access key that are associated with an IAM principal, or you can use the AWS Security Token Service (STS) to generate temporary security credentials to sign requests. Inter-network traffic privacy 1769 Amazon QuickSight User Guide Traffic between AWS resources in the same region An Amazon Virtual Private Cloud (Amazon VPC) endpoint for Amazon QuickSight is a logical entity within a VPC that allows connectivity only to Amazon QuickSight. The VPC routes requests to Amazon QuickSight and routes responses back to the VPC. For more information, see the following: • VPC endpoints in the Amazon VPC User Guide • Connecting to a VPC with Amazon QuickSight Accessing data sources Applies to: Enterprise Edition and Standard Edition Intended audience: System administrators and Amazon QuickSight administrators Use this section to help you configure access to resources in other AWS services. We recommend that you use SSL to secure Amazon QuickSight connections to your data sources. To use SSL, you must have a certificate signed by a recognized certificate authority (CA). Amazon QuickSight doesn't accept certificates that are self-signed or issued from a nonpublic CA. For more information, see QuickSight SSL and CA certificates. Topics • Required permissions • Allowing autodiscovery of AWS resources • Authorizing connections to AWS data stores • Accessing AWS resources • Exploring your AWS data in Amazon QuickSight Required permissions Applies to: Enterprise Edition and Standard Edition Accessing data sources 1770 Amazon QuickSight User Guide Intended audience: System administrators When you connect to a data source that requires a user name, the user name must have SELECT permissions on some system tables. These permissions allow Amazon QuickSight to do things such as discover table schemas and estimate table size. The following table identifies the tables that the account must have SELECT permissions for, depending on the type of database you are connecting to. These requirements apply for all database instances you connect to, regardless of their environment. In other words, they apply whether your database instances are on-premises, in Amazon RDS, in Amazon EC2, or elsewhere. Instance type Amazon Aurora Amazon Redshift MariaDB Microsoft SQL Server MySQL Oracle Tables INFORMATION_SCHEMA.STATISTICS INFORMATION_SCHEMA.TABLES pg_stats pg_class pg_namespace INFORMATION_SCHEMA.STATISTICS INFORMATION_SCHEMA.TABLES DBCC SHOW_STATISTICS sp_statistics INFORMATION_SCHEMA.STATISTICS INFORMATION_SCHEMA.TABLES DBA_TAB_COLS Accessing data sources 1771 Amazon QuickSight Instance type PostgreSQL ServiceNow Note User Guide Tables ALL_TABLES dba_segments all_segments user_segments pg_stats pg_class pg_namespace sys_dictionary (column metadata) sys_db_object (table metadata) sys_glide_object (field type metadata) If you are using MySQL or PostgreSQL, verify that you are connecting from an allowed host or IP address. For more detail, see Database configuration requirements for self- administered instances. Allowing autodiscovery of AWS resources Applies to: Enterprise Edition and Standard Edition Intended audience: System administrators Accessing data sources 1772 Amazon QuickSight User Guide Each AWS service that you access from Amazon QuickSight needs to allow traffic from QuickSight. Instead of opening each service console separately to add permissions, a QuickSight administrator can do this in the administration screen. Before you begin, make sure that you have addressed the following prerequisites. If you choose to enable autodiscovery of AWS resources for your Amazon QuickSight account, Amazon QuickSight creates an AWS Identity and Access Management (IAM) role in your AWS account. This IAM role grants your account permission to identify and retrieve |
amazon-quicksight-user-488 | amazon-quicksight-user.pdf | 488 | Edition Intended audience: System administrators Accessing data sources 1772 Amazon QuickSight User Guide Each AWS service that you access from Amazon QuickSight needs to allow traffic from QuickSight. Instead of opening each service console separately to add permissions, a QuickSight administrator can do this in the administration screen. Before you begin, make sure that you have addressed the following prerequisites. If you choose to enable autodiscovery of AWS resources for your Amazon QuickSight account, Amazon QuickSight creates an AWS Identity and Access Management (IAM) role in your AWS account. This IAM role grants your account permission to identify and retrieve data from your AWS data sources. Because AWS limits the number of IAM roles that you can create, make sure that you have at least one free role. You need this role for Amazon QuickSight to use if you want Amazon QuickSight to autodiscover your AWS resources. You can have Amazon QuickSight autodiscover Amazon RDS DB instances or Amazon Redshift clusters that are associated with your AWS account. These resources must be located in the same AWS Region as your Amazon QuickSight account. If you choose to enable autodiscovery, choose one of the following options to make the AWS resource accessible: • For Amazon RDS DB instances that you created in a default VPC and didn't make private, or that aren't in a VPC (EC2-Classic instances), see Authorizing connections from Amazon QuickSight to Amazon RDS DB instances. In this topic, you can find information on creating a security group to allow connections from Amazon QuickSight servers. • For Amazon Redshift clusters that you created in a default VPC and didn't choose to make private, or that aren't in a VPC (that is, EC2-Classic instances), see Authorizing connections from Amazon QuickSight to Amazon Redshift clusters. In this topic, you can find information on creating a security group to allow connections from Amazon QuickSight servers. • For an Amazon RDS DB instance or Amazon Redshift cluster that is in a nondefault VPC, see Authorizing connections from Amazon QuickSight to Amazon RDS DB instances or Authorizing connections from Amazon QuickSight to Amazon Redshift clusters. In these topics, you can find information on first creating a security group to allow connections from Amazon QuickSight servers. In addition, you can find information on then verifying that the VPC meets the requirements described in Network configuration for an AWS instance in a nondefault VPC. • If you don't use a private VPC, set up the Amazon RDS instance to allow connections from the Amazon QuickSight Region's public IP address. Accessing data sources 1773 Amazon QuickSight User Guide Enabling autodiscovery is the easiest way to make this data available in Amazon QuickSight. You can still manually create data connections whether or not you enable autodiscovery. Authorizing connections to AWS data stores Applies to: Enterprise Edition and Standard Edition Intended audience: System administrators For Amazon QuickSight to access your AWS resources, you must create security groups for them that authorize connections from the IP address ranges used by Amazon QuickSight servers. You must have AWS credentials that permit you to access these AWS resources to modify their security groups. Use the procedures in the following sections to enable Amazon QuickSight connections. Topics • Authorizing connections from Amazon QuickSight to Amazon RDS DB instances • Authorizing connections from Amazon QuickSight to Amazon Redshift clusters • Authorizing connections from Amazon QuickSight to Amazon EC2 instances • Authorizing connections through AWS Lake Formation • Authorizing connections to Amazon OpenSearch Service • Authorizing connections to Amazon Athena Authorizing connections from Amazon QuickSight to Amazon RDS DB instances Applies to: Enterprise Edition and Standard Edition Intended audience: System administrators For Amazon QuickSight to connect to an Amazon RDS DB instance, you must create a new security group for that DB instance. This security group contains an inbound rule authorizing access from Accessing data sources 1774 Amazon QuickSight User Guide the appropriate IP address range for the Amazon QuickSight servers in that AWS Region. To learn more about authorizing Amazon QuickSight connections, see Manually enabling access to an Amazon RDS instance in a VPC or Manually enabling access to an Amazon RDS instance that is not in a VPC. To create and assign a security group for an Amazon RDS DB instance, you must have AWS credentials that permit access to that DB instance. Enabling connection from Amazon QuickSight servers to your instance is just one of several prerequisites for creating a data set based on an AWS database data source. For more information about what is required, see Creating a dataset from a database. Manually enabling access to an Amazon RDS instance in a VPC Use the following procedure to enable Amazon QuickSight access to an Amazon RDS DB instance in a VPC. If your Amazon RDS DB instance is in subnet that |
amazon-quicksight-user-489 | amazon-quicksight-user.pdf | 489 | security group for an Amazon RDS DB instance, you must have AWS credentials that permit access to that DB instance. Enabling connection from Amazon QuickSight servers to your instance is just one of several prerequisites for creating a data set based on an AWS database data source. For more information about what is required, see Creating a dataset from a database. Manually enabling access to an Amazon RDS instance in a VPC Use the following procedure to enable Amazon QuickSight access to an Amazon RDS DB instance in a VPC. If your Amazon RDS DB instance is in subnet that is private (in relation to Amazon QuickSight) or that has Internet Gateways attached, see Connecting to a VPC with Amazon QuickSight. To enable Amazon QuickSight access to an Amazon RDS DB instance in a VPC 1. Sign in to the AWS Management Console and open the Amazon RDS console at https:// console.aws.amazon.com/rds/. 2. Choose Databases, locate the DB instance, and view its details. To do this, you click directly on its name (a hyperlink in the DB identifier column). Locate Port and note the Port value. This can be a number or a range. Locate VPC and note the VPC value. 3. 4. 5. Choose the VPC value to open the VPC console. In the Amazon VPC Management Console, choose Security Groups in the navigation pane. 6. Choose Create Security Group. 7. On the Create Security Group page, enter the security group information as follows: • For Name tag and Group name, enter Amazon-QuickSight-access. • For Description, enter Amazon-QuickSight-access. • For VPC, choose the VPC for your instance. This VPC is the one with the VPC ID that you noted previously. 8. Choose Create. On the confirmation page, note the Security Group ID. Choose Close to exit this screen. Accessing data sources 1775 Amazon QuickSight User Guide 9. Choose your new security group from the list, and then choose Inbound Rules from the tab list below. 10. Choose Edit rules to create a new rule. 11. On the Edit inbound rules page, choose Add rule to create a new rule. Use the following values: • For Type, choose Custom TCP Rule. • For Protocol, choose TCP. • For Port Range, enter the port number or range of the Amazon RDS cluster. This port number (or range) is the one that you noted previously. • For Source, choose Custom from the list. Next to the word "Custom", enter the CIDR address block for the AWS Region where you plan to use Amazon QuickSight. For example, for Europe (Ireland) you would enter Europe (Ireland)'s CIDR address block: 52.210.255.224/27. For more information on the IP address ranges for Amazon QuickSight in supported AWS Regions, see AWS Regions, websites, IP address ranges, and endpoints. Note If you have activated Amazon QuickSight in multiple AWS Regions, you can create inbound rules for each Amazon QuickSight endpoint CIDR. Doing this allows Amazon QuickSight to have access to the Amazon RDS DB instance from any AWS Region defined in the inbound rules. Anyone who uses Amazon QuickSight in multiple AWS Regions is treated as a single user. In other words, even if you are using Amazon QuickSight in every AWS Region, both your Amazon QuickSight subscription (sometimes called an 'account') and your users are global. 12. For Description, enter a useful description, for example "Europe (Ireland) QuickSight". 13. Choose Save rules to save your new inbound rule. Then choose Close. 14. Go back to the detailed view of the DB instance. Return the Amazon RDS console (https:// console.aws.amazon.com/rds/) and choose Databases. Accessing data sources 1776 Amazon QuickSight User Guide 15. Choose the DB identifier for the relevant RDS instance. Choose Modify. The same screen displays whether you choose Modify from the databases screen or the DB instance screen: Modify DB Instance. 16. Locate the Network & Security section (the third section from the top). The currently assigned security group or groups are already chosen for Security Group. Don't remove any of the existing ones unless you are sure. Instead, choose your new security group to add it to the other groups that are selected. If you followed the name suggested previously, this group might be named something similar to Amazon-QuickSight-access. 17. Scroll to the bottom of the screen. Choose Continue. and then choose Modify DB Instance. 18. Choose Apply during the next scheduled maintenance (the screen indicates when this will occur). Don't choose Apply immediately. Doing this also applies any additional changes that are in the pending modifications queue. Some of these changes might require downtime. If you bring the server down outside the maintenance window, this can cause a problem for users of this DB instance. Consult your system administrators before applying immediate changes. 19. Choose Modify DB Instance to confirm your changes. Then, wait for |
amazon-quicksight-user-490 | amazon-quicksight-user.pdf | 490 | similar to Amazon-QuickSight-access. 17. Scroll to the bottom of the screen. Choose Continue. and then choose Modify DB Instance. 18. Choose Apply during the next scheduled maintenance (the screen indicates when this will occur). Don't choose Apply immediately. Doing this also applies any additional changes that are in the pending modifications queue. Some of these changes might require downtime. If you bring the server down outside the maintenance window, this can cause a problem for users of this DB instance. Consult your system administrators before applying immediate changes. 19. Choose Modify DB Instance to confirm your changes. Then, wait for the next maintenance window to pass. Manually enabling access to an Amazon RDS instance that is not in a VPC Use the following procedure to access an Amazon RDS DB instance that is not in a VPC. You can associate a security group with a DB instance by using Modify on the RDS console, the ModifyDBInstance Amazon RDS API, or the modify-db-instance AWS CLI command. Note This section included for backwards compatibility purposes. To use the console to access an Amazon RDS DB instance that is not in a VPC 1. Sign in to the AWS Management Console and open the Amazon RDS console at https:// console.aws.amazon.com/rds/. Accessing data sources 1777 Amazon QuickSight User Guide 2. Choose Databases, select the DB instance, and choose Modify. 3. Choose Security Groups in the navigation pane. 4. Choose Create DB Security Group. 5. Enter Amazon-QuickSight-access for the Name and Description values, and then choose Create. 6. The new security group is selected by default. Select the details icon next to the security group, as shown following. 7. 8. For Connection Type, choose CIDR/IP. For CIDR/IP to Authorize, enter the appropriate CIDR address block. For more information on the IP address ranges for Amazon QuickSight in supported AWS Regions, see AWS Regions, websites, IP address ranges, and endpoints. 9. Choose Authorize. 10. Return to the Instances page of the Amazon RDS Management Console, choose the instance that you want to enable access to, choose Instance Actions, and then choose Modify. 11. In the Network & Security section, the currently assigned security group or groups already is chosen for Security Group. Press CTRL and choose Amazon-QuickSight-access in addition to the other selected groups. 12. Choose Continue, and then choose Modify DB Instance. Accessing data sources 1778 Amazon QuickSight User Guide Authorizing connections from Amazon QuickSight to Amazon Redshift clusters Applies to: Enterprise Edition and Standard Edition Intended audience: System administrators You can provide access to Amazon Redshift data using three authentication methods: trusted identity propagation, run-as IAM role, or Amazon Redshift database credentials. With trusted identity propagation, a user's identity is passed to Amazon Redshift with single sign- on that is managed by IAM Identity Center. A user that accesses a dashboard in QuickSight has their identity propagated to Amazon Redshift. In Amazon Redshift, fine grained data permissions are applied on the data before the data is presented in a QuickSight asset to the user. QuickSight authors can also connect to Amazon Redshift data sources without a password input or IAM role. If Amazon Redshift Spectrum is used, all permission management is centralized in Amazon Redshift. Trusted identity propagation is supported when QuickSight and Amazon Redshift use the same organization instance of IAM Identity Center. Trusted identity propagation is not currently supported for the following features. • SPICE datasets • Custom SQL on data sources • Alerts • Email reports • Amazon QuickSight Q • CSV, Excel, and PDF exports • Anomaly detection For Amazon QuickSight to connect to an Amazon Redshift instance, you must create a new security group for that instance. This security group contains an inbound rule that authorizes access from the appropriate IP address range for the Amazon QuickSight servers in that AWS Region. To learn more about authorizing Amazon QuickSight connections, see Manually enabling access to an Amazon Redshift cluster in a VPC. Accessing data sources 1779 Amazon QuickSight User Guide Enabling connection from Amazon QuickSight servers to your cluster is just one of several prerequisites for creating a data set based on an AWS database data source. For more information about what is required, see Creating a dataset from a database. Topics • Enabling trusted identity propagation with Amazon Redshift • Manually enabling access to an Amazon Redshift cluster in a VPC • Enabling access to Amazon Redshift Spectrum Enabling trusted identity propagation with Amazon Redshift Trusted identity propagation authenticates the end user in Amazon Redshift when they access QuickSight assets that leverage a trusted identity propagation enabled data source. When an author creates a data source with trusted identity propagation, the identity of the data source consumers in QuickSight is propagated and logged in CloudTrail. This allows database administrators to centrally manage data security in Amazon Redshift and |
amazon-quicksight-user-491 | amazon-quicksight-user.pdf | 491 | a database. Topics • Enabling trusted identity propagation with Amazon Redshift • Manually enabling access to an Amazon Redshift cluster in a VPC • Enabling access to Amazon Redshift Spectrum Enabling trusted identity propagation with Amazon Redshift Trusted identity propagation authenticates the end user in Amazon Redshift when they access QuickSight assets that leverage a trusted identity propagation enabled data source. When an author creates a data source with trusted identity propagation, the identity of the data source consumers in QuickSight is propagated and logged in CloudTrail. This allows database administrators to centrally manage data security in Amazon Redshift and automatically apply all data security rules to data consumers in QuickSight. With other authentication methods, the data permissions of the author who created the data source are applied to all data source consumers. The data source author can choose to apply additional row and column level security to the data sources that they create in Amazon QuickSight. Trusted identity propagation data sources are supported only in Direct Query datasets. SPICE datasets do not currently support trusted identity propagation. Topics • Prerequisites • Enabling trusted identity propagation in QuickSight • Connecting to Amazon Redshift with trusted identity propagation Prerequisites Before you get started, make sure that you have all of the required prerequisites ready. • Trusted identity propagation is only supported for QuickSight accounts that are integrated with IAM Identity Center. For more information, see Configure your Amazon QuickSight account with IAM Identity Center. Accessing data sources 1780 Amazon QuickSight User Guide • An Amazon Redshift application that is integrated with IAM Identity Center. The Amazon Redshift cluster that you use must be in the same organization in AWS Organizations as the QuickSight account that you want to use. The cluster must also be configured with the same organization instance in IAM Identity Center that your QuickSight account is configured to. For more information about configuring a Amazon Redshift cluster, see Integrating IAM Identity Center. Enabling trusted identity propagation in QuickSight To configure QuickSight to connect to Amazon Redshift data sources with trusted identity propagation, configure Amazon Redshift OAuth scopes to your QuickSight account. To add a scope that allows QuickSight to authorize identity propagation to Amazon Redshift, specify the AWS account ID of the QuickSight account and the service that you want to authorize identity propagation with, in this case 'REDSHIFT'. Specify the IAM Identity Center application ARN of the Amazon Redshift cluster that you are authorizing Amazon QuickSight to propagate user identities to. This information can be found in the Amazon Redshift console. If you don't specify authorized targets for the Amazon Redshift scope, QuickSight authorizes users from any Amazon Redshift cluster that share the same IAM Identity Center instance. The example below configures QuickSight to connect to Amazon Redshift data sources with trusted identity propagation. aws quicksight update-identity-propagation-config --aws-account-id "AWSACCOUNTID" --service "REDSHIFT" --authorized-targets "arn:aws:sso::XXXXXXXXXXXX:application/ ssoins-XXXXXXXXXXXX/apl-XXXXXXXXXXXX" "arn:aws:sso::XXXXXXXXXXXX:application/ ssoins-XXXXXXXXXXXX/apl-XXXXXXXXXXXX" The following example deletes OAuth scopes from a QuickSight account. aws quicksight delete-identity-propagation-config --aws-account-id "AWSACCOUNTID" --service "REDSHIFT" --authorized-targets "arn:aws:sso::XXXXXXXXXXXX:application/ ssoins-XXXXXXXXXXXXapl-XXXXXXXXXXXX "arn:aws:sso::XXXXXXXXXXXX:application/ ssoins-XXXXXXXXXXXX/apl-XXXXXXXXXXXX" The following example lists all OAuth scopes that are currently on a QuickSight account. aws quicksight list-identity-propagation-configs --aws-account-id "AWSACCOUNTID" Accessing data sources 1781 Amazon QuickSight User Guide Connecting to Amazon Redshift with trusted identity propagation Use the procedure below to connect to Amazon Redshift trusted identity propagation. To connect to Amazon Redshift with trusted identity propagation 1. Create a new dataset in Amazon QuickSight. For more information about creating a dataset, see Creating datasets. 2. Choose Amazon Redshift as the data source for the new dataset. Note The authentication type of an existing data source can't be changed to trusted identity propagation 3. Choose IAM Identity Center as the identity option for the data source, and then choose Create data source. Manually enabling access to an Amazon Redshift cluster in a VPC Applies to: Enterprise Edition Use the following procedure to enable Amazon QuickSight access to an Amazon Redshift cluster in a VPC. To enable Amazon QuickSight access to an Amazon Redshift cluster in a VPC 1. Sign in to the AWS Management Console and open the Amazon Redshift console at https:// console.aws.amazon.com/redshiftv2/. 2. Navigate to the cluster that you want to make available in Amazon QuickSight. 3. 4. In the Cluster Properties section, find Port. Note the Port value. In the Cluster Properties section, find VPC ID and note the VPC ID value. Choose VPC ID to open the Amazon VPC console. 5. On the Amazon VPC console, choose Security Groups in the navigation pane. 6. Choose Create Security Group. 7. On the Create Security Group page, enter the security group information as follows: Accessing data sources 1782 Amazon QuickSight User Guide • For Security group name, enter redshift-security-group. • For Description, enter redshift-security-group. • For VPC, choose the VPC for your Amazon Redshift cluster. This is the |
amazon-quicksight-user-492 | amazon-quicksight-user.pdf | 492 | In the Cluster Properties section, find Port. Note the Port value. In the Cluster Properties section, find VPC ID and note the VPC ID value. Choose VPC ID to open the Amazon VPC console. 5. On the Amazon VPC console, choose Security Groups in the navigation pane. 6. Choose Create Security Group. 7. On the Create Security Group page, enter the security group information as follows: Accessing data sources 1782 Amazon QuickSight User Guide • For Security group name, enter redshift-security-group. • For Description, enter redshift-security-group. • For VPC, choose the VPC for your Amazon Redshift cluster. This is the VPC with the VPC ID that you noted. 8. Choose Create security group. Your new security group should appear on the screen. 9. Create a second security group with the following properties. • For Security group name, enter quicksight-security-group. • For Description, enter quicksight-security-group. • For VPC, choose the VPC for your Amazon Redshift cluster. This is the VPC with the VPC ID that you noted. 10. Choose Create security group. 11. After you create the new security groups, create inbound rules for the new groups. Choose the new redshift-security-group security group, and input the following values. • For Type, choose Amazon Redshift. • For Protocol, choose TCP. • For Port Range, enter the port number of the Amazon Redshift cluster to which you are providing access. This is the port number that you noted in an earlier step. • For Source, enter the security group ID of quicksight-security-group. 12. Choose Save rules to save your new inbound rule. 13. Repeat the previous step for quicksight-security-group and enter the following values. • For Type, choose All traffic. • For Protocol, choose All. • For Port Range, choose All. • For Source, enter the security group ID of redshift-security-group. 14. Choose Save rules to save your new inbound rule. 15. In QuickSight, navigate to the Manage QuickSight menu. 16. Choose Manage VPC connections, and then choose Add VPC connection. Accessing data sources 1783 Amazon QuickSight User Guide 17. Configure the new VPC connection with the following values. • For VPC connection name, choose a meaningful name for the VPC connection. • For VPC ID, choose the VPC in which the Amazon Redshift cluster exists. • For Subnet ID, choose the subnet for the Availability Zone (AZ) that is used for Amazon Redshift. • For Security group id, copy and paste the security group ID for quicksight-security- group. 18. Choose Create. It might take several minutes for the new VPC to generate. 19. In the Amazon Redshift console, navigate to the Amazon Redshift cluster that redshift- security-group is configured to. Choose Properties. underNetwork and security settings, enter the name of the security group. 20. In QuickSight, choose Datasets, and then choose New dataset. Create a new dataset with the following values. • For Data source, choose Amazon Redshift Auto-discovered. • Give the data source a meaningful name. • The instance ID should auto populate with the VPC connection that you created in QuickSight. If the instance ID doesn't auto populate, choose the VPC that you created from the dropdown list. • Enter the database credentials. If your QuickSight account uses trusted identity propagation, choose Single sign-on. 21. Validate the connection, and then choose Create data source. If you want to restrict the default outbound rules further, update the outbound rule of quicksight-security-group to allow only Amazon Redshift traffic to redshift-security- group. You can also delete the outbound rule that's located in the redshift-security-group. Enabling access to Amazon Redshift Spectrum Using Amazon Redshift Spectrum, you can connect Amazon QuickSight to an external catalog with Amazon Redshift. For example, you can access the Amazon Athena catalog . You can then query unstructured data on your Amazon S3 data lake using an Amazon Redshift cluster instead of the Athena query engine. Accessing data sources 1784 Amazon QuickSight User Guide You can also combine data sets that include data stored in Amazon Redshift and in S3. Then you can access them using the SQL syntax in Amazon Redshift. After you've registered your data catalog (for Athena) or external schema (for a Hive metastore), you can use Amazon QuickSight to choose the external schema and Amazon Redshift Spectrum tables. This process works just as for any other Amazon Redshift tables in your cluster. You don't need to load or transform your data. For more information on using Amazon Redshift Spectrum, see Using Amazon Redshift Spectrum to query external data in the Amazon Redshift Database Developer Guide. To connect using Redshift Spectrum, do the following: • Create or identify an IAM role associated with the Amazon Redshift cluster. • Add the IAM policies AmazonS3ReadOnlyAccess and AmazonAthenaFullAccess to the IAM role. • Register an external schema or data catalog for the tables that you plan to use. Redshift Spectrum |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.