Implementing CUDOS for an Enterprise - Part 2: Filtering Data using Row Level Security
Tags: aws, finops, tutorial
Published: 2022-07-08 20:21:53

<!-- wp:heading -->
<h2>Introduction</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In my first post on the CUDOS solution, I showed you how you can <a rel="noreferrer noopener" href="https://cloudyadvice.com/2022/04/29/implementing-cudos-cost-intelligence-dashboards-for-an-enterprise/" target="_blank">implement implement SSO access to CUDOS using AWS Single Sign-on service</a>.   Leveraging this capability you can enable users to sign in to QuickSight using their corporate credentials and avoid having to give them full access to the AWS console.  Now that we've got our users setup via SSO, let's leverage these same user objects to enable additional functionality.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>By default, when a user accesses your CUDOS dashboard, they will have the ability to see billing data for every account in your AWS organization.  If you have a large environment with dozens or even hundreds of AWS accounts, this may be less than desirable.  Users may have a hard time figuring out how to just see the data for accounts they are interested in, or as an admin you may have a desire to limit what data they can see.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In this article, I'm going to show you a method to limit what account data any given user can see in the CUDOS dashboard.  Once implemented, the user will only be able to see billing data for the accounts that you have granted them access to.   </p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>The Solution</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>There are two primary components to this solution.   The first is <a rel="noreferrer noopener" href="https://docs.aws.amazon.com/quicksight/latest/user/creating-quicksight-groups.html" target="_blank">QuickSight Groups</a>.   QuickSight groups are just what you would expect, a feature that allows you to organize sets of users into groups that make it easier to manage access and security.   When I first started working with QuickSight, groups were an absolute pain to manage.  Originally they could not be managed via the AWS console...in fact they were not even <em>visible</em> in the console and could only be created, managed or listed using AWS CLI commands.  Good news for you however is that as of March 2022 you can now <a rel="noreferrer noopener" href="https://aws.amazon.com/about-aws/whats-new/2022/03/amazon-quicksight-groups-management-ui/" target="_blank">manage QuickSight Groups in the QuickSight console</a>.   </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The second component of our solution is something called <a rel="noreferrer noopener" href="https://docs.aws.amazon.com/quicksight/latest/user/row-level-security.html" target="_blank">row-level security (RLS)</a>.  This is a feature of the Enterprise Edition of QuickSight that allows you to restrict access to a dataset using a set of dataset rules.  Once implemented, dataset owners can still see all the data, but dataset readers will be restricted based on the criteria in your ruleset.   Access to a dataset can be restricted by user/group based rules, tag-based rules, or both.  Tag based rules are really targeted towards anonymous users if you are doing something like an embedded dashboard, so we will be focusing on <a rel="noreferrer noopener" href="https://docs.aws.amazon.com/quicksight/latest/user/restrict-access-to-a-data-set-using-row-level-security.html" target="_blank">user/group based rules</a> for our architecture.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The diagram below outlines how the components outlined below come together for our solution.   </p>
<!-- /wp:paragraph -->

<!-- wp:list {"ordered":true} -->
<ol><li>QuickSight users are placed into QuickSight Groups</li><li>An input file is prepared in CSV format containing the dataset rules and stored in an S3 bucket</li><li>The input file is imported into a QuickSight dataset</li><li>The rules dataset is used to apply row-level security against the appropriate CUDOS datasets</li></ol>
<!-- /wp:list -->

<!-- wp:image {"id":851,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/QuickSight-RLS-Security-1024x761.png" alt="" class="wp-image-851"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Now that I've given you a high level overview of the solution, let's walk through the implementation in detail.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Implementation</h2>
<!-- /wp:heading -->

<!-- wp:heading {"level":3} -->
<h3>Step 1 - Create QuickSight groups</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>The foundation for implementing your filtering is the creation of one or more QuickSight groups.  These groups will be used later in our row-level security dataset to tell QuickSight how to filter data set views.  You will need to create a QuickSight Group for each set of accounts that you want to group together.  </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>To create a QuickSight group:</p>
<!-- /wp:paragraph -->

<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:list {"ordered":true} -->
<ol><li>Sign in to the AWS Console in the account where you are hosting QuickSight, navigate to the QuickSight service.</li><li>On the QuickSight home page, click the menu in the upper right and select <strong>Manage QuickSight</strong>.</li><li>On the QuickSight Management page, select <strong>Manage Groups</strong> from the left hand menu.</li><li>On the Manage Groups page click the blue <strong>New Group</strong> button.</li><li>On the Create a New Group screen, enter a Group name. Note the group name cannot contain any spaces or certain special characters. Optionally enter a group description and click the blue <strong>Create</strong> button.</li></ol>
<!-- /wp:list --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:jetpack/tiled-gallery {"columnWidths":[["42.38856","57.61144"]],"ids":[858,860,861],"roundedCorners":6} -->
<div class="wp-block-jetpack-tiled-gallery aligncenter is-style-rectangular has-rounded-corners-6"><div class="tiled-gallery__gallery"><div class="tiled-gallery__row"><div class="tiled-gallery__col" style="flex-basis:42.38856%"><figure class="tiled-gallery__item"><img alt="" data-height="906" data-id="858" data-link="https://cloudyadvice.com/?attachment_id=858" data-url="https://cloudyadvice.com/wp-content/uploads/2022/05/QuickSight-select-Manage-groups-3.png" data-width="453" src="https://i0.wp.com/cloudyadvice.com/wp-content/uploads/2022/05/QuickSight-select-Manage-groups-3.png?ssl=1" data-amp-layout="responsive"/></figure></div><div class="tiled-gallery__col" style="flex-basis:57.61144%"><figure class="tiled-gallery__item"><img alt="" data-height="296" data-id="860" data-link="https://cloudyadvice.com/?attachment_id=860" data-url="https://cloudyadvice.com/wp-content/uploads/2022/05/New-group-button-1.png" data-width="444" src="https://i1.wp.com/cloudyadvice.com/wp-content/uploads/2022/05/New-group-button-1.png?ssl=1" data-amp-layout="responsive"/></figure><figure class="tiled-gallery__item"><img alt="" data-height="589" data-id="861" data-link="https://cloudyadvice.com/?attachment_id=861" data-url="https://cloudyadvice.com/wp-content/uploads/2022/05/Create_a_new_group.png" data-width="748" src="https://i2.wp.com/cloudyadvice.com/wp-content/uploads/2022/05/Create_a_new_group.png?ssl=1" data-amp-layout="responsive"/></figure></div></div></div></div>



<!-- wp:media-text {"mediaPosition":"right","mediaId":863,"mediaLink":"https://cloudyadvice.com/?attachment_id=863","mediaType":"image","mediaWidth":57} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 57%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/new-group-add-user-1.png" alt="" class="wp-image-863 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"placeholder":"Content…"} -->
<p>6.  After you create your new group, you will be take to the group membership page where you can now add QuickSight users to the group.  Click the blue <strong>Add User</strong> button and add new users by user name or email address.</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:paragraph -->
<p>Repeat this process for each group that you need to create.   My recommendation is to create groups for each logical grouping of accounts in your AWS Organization, could be by project team, business group, or whatever works best for you.  Note also that a user can be a member of more than one QuickSight group, for example if you want to give them access to more than one set of accounts.   In addition to team specific groups, I recommend creating a group called "FullAccess" for any QuickSight users that you want to be able to see all your AWS Accounts in the dataset. Once you've created your QuickSight Groups, it's time to setup your rules mapping file.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Step 2: Row Level Security Rules Input file</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>As documented in the QuickSight user guide, you can setup RLS with user-based rules by creating a query or a file that feeds the rules dataset.  I'm not really a SQL guy, so I find the file based option to be simplest to setup and it makes it easy for me to change my ruleset as needed.  I just edit the file and replace the version stored in the S3 bucket (more on this process later).  To get started, create a new comma-separated value (CSV) file with two columns in it.  Column A header should be "GroupName" and column B header should be "account_id".  </p>
<!-- /wp:paragraph -->

<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column {"width":"66.66%"} -->
<div class="wp-block-column" style="flex-basis:66.66%"><!-- wp:paragraph -->
<p>Next, we will populate the GroupName column with the QuickSight Group names we created in step 1. In the account_id column, you will enter the AWS Account number you want that group to have access to, enclosed in double quotes. If you want to give a single QuickSight group access to more than one account, you will need to create a row for each account_id, all using the same GroupName. I was originally told by some folks at AWS that you could enter multiple account ids in a single column, separated by commas, but I could never get that to work and settled on this file format through trial and error.  To grant your "FullAccess" group access to all data in the dataset, create a row with that group name and leave the account_id column empty.  See the screenshot at right shows an example of what your file should look like.   </p>
<!-- /wp:paragraph --></div>
<!-- /wp:column -->

<!-- wp:column {"width":"33.33%"} -->
<div class="wp-block-column" style="flex-basis:33.33%"><!-- wp:image {"id":866,"sizeSlug":"full","linkDestination":"none"} -->
<figure class="wp-block-image size-full"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/CUDOS_dataset_rls-2.png" alt="" class="wp-image-866"/></figure>
<!-- /wp:image --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:paragraph -->
<p>Save your file, giving it a name like "cudos_dataset_rls.csv" or something similar.   With our file created, we are now ready for the next step, creating the rules QuickSight dataset.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Step 3: Create a CUDOS RLS Rules Dataset</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>We need to create a new QuickSight Dataset to store our RLS rules so that we can then apply them against our CUDOS datasets.  Since it is very likely we will want to make changes to these rules over time, we want to create a dataset that is looking at specific location in an S3 bucket rather than just uploading the file into a dataset.   By using the S3 method, whenever we want to update our RLS rules, all we have to do is upload a new version of the file to S3.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In preparation for creating the S3 dataset, upload the CSV file you created in step 2 to a private S3 bucket in the AWS account where you are running QuickSight. This can be a new purpose-created S3 bucket or you can use an existing bucket, for example the bucket you use to store your QuickSight queries results. Then, we need to create an <a href="https://docs.aws.amazon.com/quicksight/latest/user/supported-manifest-file-format.html" target="_blank" rel="noreferrer noopener">S3 manifest file</a> that will tell QuickSight where our file is located in S3.   </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>An S3 manifest is a JSON file that contains the S3 url of the file location.  Create a new file called "CUDOS_manifest.json" and set it up like the example below, replacing "YOUR_BUCKET_NAME" and "YOURFILENAME" with the proper values for your file.  </p>
<!-- /wp:paragraph -->

<!-- wp:code -->
<pre class="wp-block-code"><code>{
	"entries": &#91;{
		"url": "s3://YOUR_BUCKET_NAME/YOURFILENAME.csv",
		"mandatory": true
	}]
}</code></pre>
<!-- /wp:code -->

<!-- wp:paragraph -->
<p>You can store the manifest file in the same S3 bucket where you placed your CSV file.  With the files in S3 prepared, you can follow this process to create the new dataset.</p>
<!-- /wp:paragraph -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":870,"mediaLink":"https://cloudyadvice.com/?attachment_id=870","mediaType":"image","mediaWidth":31} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 31%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/New_Data_Set.png" alt="" class="wp-image-870 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:list {"ordered":true} -->
<ol id="block-1e21f5b0-c887-46ee-ae9b-c958c91595dd"><li>Log in to the AWS Console in the account where you are running QuickSight, navigate to the QuickSight service.</li><li>From the QuickSight home page, click <strong>Datasets</strong> on the left hand menu bar.</li><li>On the Create Datasets screen, click S3.</li><li>On the Datasets page, click the blue <strong>New dataset</strong> button.</li></ol>
<!-- /wp:list --></div></div>
<!-- /wp:media-text -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":869,"mediaLink":"https://cloudyadvice.com/?attachment_id=869","mediaType":"image","mediaWidth":37} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 37%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/new-s3-datasource.png" alt="" class="wp-image-869 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph {"align":"justify"} -->
<p class="has-text-align-justify">5.  For data source name enter "CUDOS_Dataset_rules" and enter the S3 URL of your manifest file in the "Upload a manifest file" field. Make sure the "URL" radio button is selected and click Connect</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":871,"mediaLink":"https://cloudyadvice.com/?attachment_id=871","mediaType":"image","mediaWidth":38} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 38%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/Finish-dataset-creation.png" alt="" class="wp-image-871 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>6.  On the Finish dataset creation screen, click the Edit/Preview data button. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>7.  In the dataset preview screen, we need to verify the the account_ID field is a String datatype.  If it appears as an Integer, change the data type for account_id to String.   Follow the screenshots below for how to do this.</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:image {"id":873,"sizeSlug":"large","linkDestination":"none"} -->
<figure class="wp-block-image size-large"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/change-data-type-1024x721.png" alt="" class="wp-image-873"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>It is very important to make this change because it matches the same data type as the account_id field in all of the CUDOS datasets and prevents the loss of any leading or trailing zeros on an account_id.  After you've finished changing the field type, click Save &amp; publish in the upper right to save your dataset. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>With our rules dataset prepared, we can move on to the last step, applying these rules against the CUDOS datasets.   </p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Step 4: Apply Row Level Security to CUDOS datasets</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>On each of the datasets that the CUDOS dashboard is using, we will define row level security for the dataset by following these steps:</p>
<!-- /wp:paragraph -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":881,"mediaLink":"https://cloudyadvice.com/?attachment_id=881","mediaType":"image","mediaWidth":44} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 44%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/manage-dataset-security-982x1024.png" alt="" class="wp-image-881 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:list {"ordered":true} -->
<ol id="block-6ebe549e-8e76-4702-a956-17246b3024dc"><li>In the QuickSight management console, choose Datasets from the left hand navigation menu.</li><li>Click the dataset name, e.g. "cudos_summary_view"</li><li>A dataset details window will pop open showing you more information about the dataset.</li><li> Click the button bottom left labeled <strong>Row-level security</strong></li></ol>
<!-- /wp:list --></div></div>
<!-- /wp:media-text -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":882,"mediaLink":"https://cloudyadvice.com/?attachment_id=882","mediaType":"image","mediaWidth":44} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 44%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/apply-RLS-dataset-853x1024.png" alt="" class="wp-image-882 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>5.  You will be taken to the Set up row-level security screen.  Click the double-caret to expand the User-based rules section.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>6.  You will see that the selected dataset rules is currently set to None, and below you will see a list of all QuickSight datasets in your environment.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>7.  Click the radio button next to the CUDOS_dataset_rules dataset you created in Step 3 to select it.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>8. Click the blue Apply dataset button to apply these rules against your dataset.</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":887,"mediaLink":"https://cloudyadvice.com/?attachment_id=887","mediaType":"image","mediaWidth":42} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 42%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/confirm-apply-RLS-2.png" alt="" class="wp-image-887 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>9.   A confirmation window will open, confirming that the dataset rules will use the GroupName column to find matching rules.  Click <strong>Apply and Activate</strong>.   </p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":884,"mediaLink":"https://cloudyadvice.com/?attachment_id=884","mediaType":"image","mediaWidth":46} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 46%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/RLS-applied-to-dataset-2-1024x352.png" alt="" class="wp-image-884 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>10.  You will be taken back to the row-level security screen, where you should now see your dataset listed under the Selected Dataset Rules.</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:paragraph -->
<p>To ensure the security filtering is consistent across all the CUDOS dashboard tabs, you will need to repeat these steps for all of the CUDOS related datasets.  As of this writing, these are the CUDOS datasets that I applied the rules against:</p>
<!-- /wp:paragraph -->

<!-- wp:list -->
<ul><li>cudos_summary_view</li><li>cudos_compute_savings_plan_eligible_spend</li><li>cudos_s3_view</li><li>cudos_ec2_running_cost</li><li>cctd_view</li><li>cudos_cur</li></ul>
<!-- /wp:list -->

<!-- wp:heading -->
<h2>Test!</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Once you have completed applying the RLS ruleset against each of the CUDOS datasets, you should test to confirm that row-level security is working correctly.  You can do this by logging into the QuickSight dashboard using a user that is a member of group that has limited access, and validate that the AWS Account IDs shown are only the ones specified in your rules dataset.   You should also access the dashboard as a user who is a member of the FullAccess group and validate that all AWS Account IDs are still visible.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Updating RLS rules</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Over time you may find that you wish to update your row-level security rules to reflect new AWS accounts or new QuickSight groups.  The process to update your rules is simple:</p>
<!-- /wp:paragraph -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":890,"mediaLink":"https://cloudyadvice.com/?attachment_id=890","mediaType":"image","mediaWidth":56} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 56%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/refresh-dataset-now-1024x1012.png" alt="" class="wp-image-890 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:list {"ordered":true} -->
<ol id="block-8c6ff365-5b34-4a12-9ea1-b3409d12c5c4"><li>Update your CSV file with the new rules, adding new QuickSight groups or account_id values as needed.</li><li>Upload the updated CSV file to your S3 bucket and replace the existing file.</li><li>Navigate to the QuickSight management console</li><li>Click on Datasets in the left hand menu.</li><li>On the datasets screen, click your CUDOS_dataset_rules dataset.</li><li>On the dataset summary screen, click the Refresh now button</li></ol>
<!-- /wp:list --></div></div>
<!-- /wp:media-text -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":891,"mediaLink":"https://cloudyadvice.com/?attachment_id=891","mediaType":"image","mediaWidth":37} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 37%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/refresh-now-1024x366.png" alt="" class="wp-image-891 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>7.  A dialog box will open, click the blue Refresh button to complete the refresh of your dataset.</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:media-text {"mediaPosition":"right","mediaId":892,"mediaLink":"https://cloudyadvice.com/?attachment_id=892","mediaType":"image","mediaWidth":37} -->
<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile" style="grid-template-columns:auto 37%"><figure class="wp-block-media-text__media"><img src="https://cloudyadvice.com/wp-content/uploads/2022/05/refresh-warning-1024x328.png" alt="" class="wp-image-892 size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:paragraph -->
<p>8.  A "Warning" dialog will open, click Ok to confirm the dataset refresh.  Afterwards you will get a Success dialog box confirming that the refresh has been queued.  Click Ok.</p>
<!-- /wp:paragraph --></div></div>
<!-- /wp:media-text -->

<!-- wp:paragraph -->
<p>QuickSight will automatically apply the new rules against your CUDOS dataset when the refresh has completed.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Conclusion</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>In this post, I've shown you a method to filter what data your QuickSight users can view in your CUDOS dashboard.  Implementing this feature was incredibly useful in my environment where I have over 150 AWS accounts and I might only want a particular user to be able to view billing data for just a few accounts.  It also makes it easier for your users since the data is pre-filtered for them and they don't have to manually filter out accounts they are not interested in.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>I hope you've found this article useful, and please leave a comment if you have any questions or suggestions for improvement.    Once again, I also have to give a big shout out to Aaron Edell, GTM for Customer Cloud Intelligence for AWS, who guided me on implementing the row-level security solution for QuickSight and answered the many questions I had.  </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>References:</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a href="https://docs.aws.amazon.com/quicksight/latest/user/creating-quicksight-groups.html" target="_blank" rel="noreferrer noopener">Amazon QuickSight User Guide - Creating and managing groups in Amazon QuickSight</a></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p><a rel="noreferrer noopener" href="https://docs.aws.amazon.com/quicksight/latest/user/row-level-security.html" target="_blank">Amazon QuickSight User Guide - Using row-level security (RLS) in Amazon QuickSight</a></p>
<!-- /wp:paragraph -->