AWS Big Data Blog
Enable fine-grained permissions for AWS Quick Sight authors in AWS Lake Formation
We’re excited to announce the integration of AWS Quick Sight with the AWS Lake Formation security model, which provides fine-grained access control for Quick Sight authors. Data lake administrators can now use the Lake Formation console to grant Quick Sight users and groups permissions to AWS Glue Data Catalog databases, tables, and Amazon Simple Storage Service (Amazon S3) buckets that are registered and managed via Lake Formation.
This new feature enhances the fine-grained access control capability previously introduced in Quick Sight, which allows admins to use AWS Identity and Access Management (IAM) policies to scope down Quick Sight author access to Amazon S3, Amazon Athena, Amazon Relational Database Service (Amazon RDS), and Amazon Redshift. The scope-down access is enforced by attaching IAM policies to the Quick Sight user or a group in the Quick Sight portal. For more information, see Introducing AWS Quick Sight fine-grained access control over Amazon S3 and Amazon Athena.
For Athena-based datasets, you’re no longer required to use IAM policies to scope down Quick Sight author access to Amazon S3, or Data Catalog databases and tables. You can grant permissions directly in the Lake Formation console. An added benefit is that you can also grant column-level permissions to the Quick Sight users and groups. Lake Formation handles all this for you centrally.
This feature is currently available in the Quick Sight Enterprise edition in the following Regions:
- US East (Ohio)
- US East (N. Virginia)
- US West (Oregon)
It will soon be available in all Regions where Lake Formation exists as of this post. For more information, see Region Table.
This post compares the new fine-grained permissions model in Lake Formation to the IAM policy-based access control in Quick Sight. It also provides guidance on how to migrate fine-grained permissions for Quick Sight users and groups to Lake Formation.
Quick Sight fine-grained permissions vs. Lake Formation permissions
In Quick Sight, you can limit user or group access to AWS resources by attaching a scope-down IAM policy. If no such policies exist for a user or a group (that the user is a member of), Quick Sight service role permissions determine access to the AWS resources. The following diagram illustrates how permissions work for a Quick Sight user trying to create an Athena dataset.

With the Lake Formation integration, the permissions model changes slightly. The two important differences while creating an Athena dataset are:
- Users can view the Data Catalog resources (databases and tables) that have one of the following:
- The
IAMAllowedPrincipalsecurity group is granted Super permission to the resource in Lake Formation. - An ARN for the Quick Sight user or group (that the user is a member of) is explicitly granted permissions to the resource in Lake Formation.
- The
- If the S3 source bucket for the Data Catalog resource is registered in Lake Formation. Amazon S3 access settings in Quick Sight are ignored, including scope-down IAM policies for users and groups.
The following diagram shows the change in permission model when a Quick Sight user tries to create an Athena dataset.

The following sections dive into how fine-grained permissions work in Quick Sight and how you can migrate the existing permissions to the Lake Formation security model.
Existing fine-grained access control in Quick Sight
For this use case, a business analyst in the marketing team, lf-gs-author, created an Athena dataset Monthly Sales in Quick Sight. It was built using the month_b2bsalesdata table in AWS Glue and the data in S3 bucket b2bsalesdata.
The following screenshot shows the table details.

The following screenshot shows the dataset details.

The dataset is also shared with a Quick Sight group analystgroup. See the following screenshot of the group details.

A fine-grained IAM policy enforces access to the S3 bucket b2bsalesdata for lf-qs-author and analystgroup. The following code is an example of an Amazon S3 access policy:

Enabling Quick Sight permissions in Lake Formation
To migrate Quick Sight permissions to Lake Formation, follow the steps described below (in the given order):
1.) Capturing the ARN for the Quick Sight user and group
First, capture the Quick Sight ARN for the business analyst user and marketing team group. You can use the describe-user API and the describe-group API to retrieve the user ARN and the group ARN, respectively. For example, to retrieve the ARN for the Quick Sight group analystgroup, enter the following code in the AWS Command Line Interface (AWS CLI):
aws quicksight describe-group --group-name 'analystgroup' --aws-account-id 253914981264 --namespace default
Record the group ARN from the response, similar to the following code:
Repeat the same step to retrieve the ARN for the business analyst lf-qs-author.
2.) Granting permissions in the data lake
To grant permissions to the month_b2bsalesdata table in salesdb, complete the following steps:
- Sign in to the Lake Formation console as the data lake administrator.
A data lake administrator can grant any principal (IAM, Quick Sight, or Active Directory) permissions to Data Catalog resources (databases and tables) or data lake locations in Amazon S3. For more information about creating a data lake administrator and the data lake security model, see AWS Lake Formation: How It Works.
- Choose Tables.
- Select month_b2bsalesdata.
- From the Actions drop-down menu, choose View permissions.
You see a list of principals with associated permissions for each resource type.
- Choose Grant.
- For Active Directory and AWS Quick Sight users and groups, enter the Quick Sight user ARN.
- For Table permissions, select Select.
- Optionally, under Column permissions, you can grant column-level permissions to the user. This is a benefit of using Lake Formation permissions over Quick Sight policies.
- Choose Grant.

- Repeat the preceding steps to grant select table permissions to
analystgroup, using the ARN you recorded earlier. - Select
month_b2bsalesdata. - From the Actions drop-down menu, choose View permissions.
The following screenshot shows the added permissions for the Quick Sight user and group.

3.) Removing IAMAllowedPrincipal group permissions
For Lake Formation permissions to take effect, you must remove the IAMAllowedPrincipal group from the month_b2bsalesdata table.
- Select
month_b2bsalesdata. - From the Actions drop-down menu, choose View permissions.
- Select
IAMAllowedPrincipals. - Choose Revoke.

- Choose Revoke
4.) Registering your S3 bucket in Lake Formation
You can now register the S3 source bucket (b2bsalesdata) in Lake Formation. Registering the S3 bucket switches Amazon S3 authorization from Quick Sight scope-down policies to Lake Formation security.
- Choose Data lake locations.
- Choose Register location.
- For Amazon S3 path, enter the path for your source bucket (
s3://b2bsalesdata). - For IAM role, choose the role with permissions to that bucket.
- Choose Register location.

5.) Cleaning up the scope-down policies in Quick Sight
You can now remove the scope-down policies for the user and group in Quick Sight. To find these policies, under Security and Permissions, choose IAM policy assignments.
6.) Creating a dataset in Quick Sight
To create a dataset, complete the following steps:
- Log in to Quick Sight as a user who is a member of analystgroup (someone besides
lf-qs-author). - Choose Manage data.
- Choose New data set.
- Choose Athena.
- For the data source name, enter
Marketing Data. - Choose Create data source.
- In the list of databases, choose
salesdb. - Choose
month_b2bsalesdata. - Choose Edit/Preview data.
The following screenshot shows the details of month_b2bsalesdata table.

You can also use custom SQL to query the data.
Conclusion
This post demonstrates how to extend the Lake Formation security model to Quick Sight users and groups, which allows data lake administrators to manage data catalog resource permissions centrally from one console. As organizations embark on the journey to secure their data lakes with Lake Formation, having the ability to centrally manage fine-grained permissions for Quick Sight authors can extend the data governance and enforcement of security controls at the data consumption (business intelligence) layer. You can enable these fine-grained permissions for Quick Sight users and groups at the database, table, or column level, and they’re reflected in the Athena dataset in Quick Sight.
Start migrating your fine-grained permissions to Lake Formation today, and leave your thoughts and questions in the comments.
About the Author
Adnan Hasan is a Solutions Architect with AWS Quick Sight at Amazon Web Services.