Lesson 2 of 2 Open Table Formats and AWS Lake Formation

Governing Lake Access with AWS Lake Formation Permissions

This lesson explains how AWS Lake Formation centralises fine-grained data lake security, so access is defined once and enforced across Athena, Redshift Spectrum, EMR, Glue and other engines.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe how Lake Formation permissions replace bucket-level controls.
  • Grant column-level, row-level and cell-level access.
  • Use LF-Tags for tag-based access control.
  • Share tables with other accounts without copying data.

How Lake Formation works

Without Lake Formation, data lake access is controlled with IAM and S3 bucket policies, which work at the level of buckets and prefixes and cannot express rules such as "these columns of this table". Lake Formation adds a permission model at the level of databases, tables, columns and rows. Setting it up involves a few steps.

  1. Register the locations

    Register the S3 locations that hold the data with Lake Formation, so it manages access to them.

  2. Designate administrators

    Designate data lake administrators, who can grant permissions to others.

  3. Grant permissions

    Grant permissions such as SELECT, INSERT, ALTER, DROP and DESCRIBE on Data Catalog databases and tables, optionally limited to specific columns or rows.

At query time, engines such as Athena, Redshift Spectrum and EMR ask Lake Formation for temporary credentials to read the data, a process called credential vending, and Lake Formation provides access only to what the user is allowed to see.

The following diagram shows the steps of credential vending.

Credential vending at query time. An analyst's query in Athena asks Lake Formation for access to the table. Lake Formation checks the analyst's grants and returns temporary credentials limited to what the analyst may see, and Athena reads only that data from S3.
Redshift Spectrum, EMR and Glue follow the same pattern.
Put in order

Setting up Lake Formation

Exam skills 4.2.4

Put the Lake Formation set-up steps and query-time flow in order.

Log in to try this activity Interactive activities are free with an account.

Fine-grained access

Lake Formation can grant access to parts of a table, and the grants are enforced by Athena, Redshift Spectrum, Glue and EMR. Column-level grants give a principal access only to named columns, hiding sensitive ones. Data filters add row-level and cell-level security: a filter combines a row condition with a column list, so, for example, European analysts see only rows where region = 'EU' and never the ssn column.

Tag-based access control scales these grants. Administrators attach LF-Tags, such as classification=confidential, to databases, tables and columns, and grant permissions on tag expressions instead of named resources. A new table that receives the tag is covered automatically, with no new grants. The following table summarises the levels.

LevelHow
Column-levelGrant on specific columns
Row-level and cell-levelData filters, e.g. European analysts see only rows where region = 'EU' and never the ssn column
Tag-based (LF-Tags)Attach tags such as classification=confidential to databases, tables and columns and grant by tag expression; new tagged tables are covered automatically

The following diagram shows the same customer table rows as three groups see them under column-level and row-level permissions.

The customers table as each group sees it. Customer service sees all columns and rows. Marketing analysts see every column except email, through a column-level grant. Regional managers in Germany see only rows where country is DE, through a data filter. The grants apply in Athena, Redshift Spectrum, EMR and Glue alike.
The rows are illustrative; grey cells are hidden from that group.
Match the pairs

Fine-grained access

Exam skills 4.2.4 · 4.2.5

Match each requirement with the Lake Formation mechanism.

Log in to try this activity Interactive activities are free with an account.

Sharing and migration

Lake Formation shares databases and tables with other accounts through AWS Resource Access Manager, without copying data. The consumer account creates resource links to the shared tables and grants its own users access to them, while the producer's fine-grained permissions still apply. This cross-account sharing underpins data mesh designs, in which each domain owns its data in its own account.

Organisations that already control access with IAM and S3 policies can adopt Lake Formation gradually. Hybrid access mode lets IAM and S3 permissions continue to work alongside Lake Formation permissions while users and applications move across one at a time. All data access through Lake Formation is logged in AWS CloudTrail for audits.

True or false

Sharing and hybrid access

Exam skills 4.5.1 · 4.2.4

Decide whether each statement about Lake Formation sharing is true.

Log in to try this activity Interactive activities are free with an account.
Worked example

One table, three audiences

A customers table contains names, emails, countries and lifetime value. Three groups need different views of it:

GroupLake Formation permission
Customer serviceAll columns, all rows
Marketing analystsAll columns except email (column-level)
Regional managers in GermanyRows where country = 'DE' only (data filter)

The same permissions apply in Athena, Redshift Spectrum, EMR and Glue, so no separate copies of the data are needed. Using LF-Tags such as sensitivity=pii lets the team grant access by tag across hundreds of tables, instead of table by table.

Check yourself

How are permissions scaled across many tables by data classification?

Show answer

With LF-Tags: tag databases, tables or columns, and grant permissions on the tags.

Exam Tips

Remember for the exam

  • Row-, column- and cell-level security across engines points to Lake Formation.
  • To scale permissions by data classification, use LF-Tags.
  • To share tables with other accounts without copying them, use Lake Formation cross-account grants.
  • To hide a sensitive column from some users, use column-level permissions.
  • To show users only the rows for their own Region, use a data filter (row-level security).