Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 70

Governing Data Lakes with AWS Lake Formation: Permissions and Lineage

Recommended resources

Hello! Welcome to the fourth lesson in our module on Data Governance and Auditing.

In our last lesson, we explored how AWS Glue can automatically capture and visualize data lineage, creating a map of your data's journey. We saw how Glue jobs and crawlers can send this information to Amazon DataZone. As a Data Quality Engineer, you know that understanding data's origin and transformation path (its lineage) is fundamental for troubleshooting and ensuring trust.

Today, we'll connect that concept to a broader governance framework. This lesson addresses the learning outcome: Explain how AWS Lake Formation uses data permissions and lineage for governance. We will see how Lake Formation acts as a central security and governance layer for your data lake, combining a powerful, fine-grained permissions model with the lineage and auditing information needed to maintain control and compliance.

1. What is Data Lake Governance and Why is it a Challenge?

Building a data lake involves more than just dumping data into Amazon S3. A key challenge is governing that data: ensuring that the right people have access to the right data under the right conditions, and being able to audit that access. Without a central governance layer, you're left managing a complex web of IAM policies and S3 bucket policies, which can quickly become unmanageable and error-prone.

AWS Lake Formation was created to solve this problem by providing a single place to secure and manage your data lake.

Deep Dive Into AWS Lake Formation - Level 300 (United States)

To start, let's watch the introduction to the 'Deep Dive Into AWS Lake Formation' session from AWS Events. It clearly articulates the business and technical challenges that Lake Formation is designed to solve.

Watch the first 3 minutes of the video. Focus on the typical steps required to build a data project and how Lake Formation provides the core capabilities for security, access control, and collaboration out of the box.

This governance workflow can be visualized in four stages. Lake Formation provides tools for each, but for this lesson, we will focus on the Secure & Control and Monitor & Audit stages.

AWS Lake Formation Workflow Overview
This diagram shows the end-to-end data lake governance process. Data is ingested, then secured with granular permissions. Users can then discover and use the data, with all access being checked against policies. Finally, all activity is monitored and audited, leveraging change logs and data lineage.

2. The Lake Formation Permissions Model

The heart of Lake Formation's governance capability is its unique permissions model. Instead of relying solely on IAM policies attached to users, Lake Formation provides a database-style GRANT/REVOKE system for your data lake resources (databases, tables, and columns) that are cataloged in the AWS Glue Data Catalog.

This model works through a process called credential vending.

AWS Lake Formation For Data Governance and Security

This article, 'AWS Lake Formation For Data Governance and Security' by Joud Awad, provides an excellent written explanation of the permissions workflow. It details how integrated services like Athena interact with Lake Formation to get temporary access to data.

Please read the following two sections: 'Lake Formation permissions management workflow': This section includes a diagram and a numbered list explaining the step-by-step flow from a user submitting a query to data being returned. 'Storage access management (Credential Vending For Temp Access)': This section reinforces the concept, explaining how temporary credentials are used to access S3 data on behalf of the user. Focus on understanding that the user or service (like Athena) never gets direct, long-term access to the S3 bucket. They get temporary, just-in-time credentials from Lake Formation.

In short, the process is:

  1. A user queries a table using an integrated service like Athena.
  2. Athena asks Lake Formation if the user has permission.
  3. Lake Formation checks its permissions. If authorized, it generates temporary, short-lived credentials that are scoped down to only the specific S3 objects required for the query. This is credential vending.
  4. Athena uses these temporary credentials to read the data from S3.
  5. Lake Formation also tells Athena if any column or row filtering needs to be applied, ensuring fine-grained access control is enforced.

Fine-Grained Access Control in Action

This model allows for highly specific permissions, such as granting access to an entire table while hiding a few sensitive columns.

Deep Dive Into AWS Lake Formation - Level 300 (United States)

Let's return to the 'Deep Dive Into AWS Lake Formation' video. The presenter gives a fantastic demonstration of setting up column-level permissions and then explains exactly how it works under the hood.

Please watch from 15:48 to 22:00. Pay close attention to: How a manager grants an analyst access to a table but excludes the customer_name column. How the analyst, even when running SELECT *, only sees the columns they are permitted to see. The explanation at the end that describes how Lake Formation returns a 'scoped down IAM policy' to Athena along with the temporary credentials.

In addition to column-level security, Lake Formation also supports:

  • Row-level security: Restricting access to specific rows based on column values (e.g., a sales manager can only see records where region = 'US-West').
  • Cell-level security: A combination of row and column filtering, allowing you to restrict access to a specific column only for certain rows.

These fine-grained controls are a cornerstone of data governance, enabling you to enforce the principle of least privilege easily.


3. Scaling Permissions with Tag-Based Access Control (TBAC)

Granting permissions on a table-by-table basis works for small data lakes, but it doesn't scale. Imagine managing permissions for hundreds of users across thousands of tables. This is where Lake Formation Tag-Based Access Control (LF-TBAC) becomes essential for governance at scale.

The concept is to manage permissions through metadata (tags) rather than on individual resources.

AWS Tutorials - AWS Lake Formation - Tag Based Access Control

The video 'AWS Lake Formation - Tag Based Access Control' from AWS Tutorials clearly explains the problem with resource-level permissions and how TBAC solves it.

Watch from 00:45 to 14:59. This extended clip covers three key areas: The Problem (00:45 - 05:15): Understand why managing permissions on a per-resource basis becomes tedious. The TBAC Concept (05:15 - 09:35): Grasp the three-step process: define policy tags, grant permissions on those tags, and then attach tags to resources. A Practical Example (09:35 - 14:59): See how tags like department=sales and department=customer_service can be used to automatically grant the correct permissions to different user groups when new tables are created.

With LF-TBAC, you decouple permissions from resources. Your governance policy is now expressed through tags. When a data engineer creates a new table, they simply assign the appropriate tag (e.g., confidentiality=PII, domain=finance), and the correct access controls are automatically enforced. This is a much more scalable and robust governance strategy.

Test your understanding!

Your organization has a data lake with hundreds of tables across sales, marketing, and finance domains. A new analyst joins the finance team. Using the traditional named-resource method, you would need to grant them SELECT permissions on dozens of individual finance tables.

How could you use Lake Formation Tag-Based Access Control (LF-TBAC) to simplify this process for this new analyst and all future finance hires?

Show answer
  1. Define Policy Tags: In Lake Formation, you would define an LF-Tag with the key domain and possible values sales, marketing, and finance.
  2. Grant Permissions on Tags: You would create an IAM group for finance analysts (e.g., finance-analysts-group). Then, you grant this group SELECT permissions on resources that match the LF-Tag domain=finance.
  3. Tag Resources: Ensure all tables related to finance are assigned the LF-Tag domain=finance.
  4. Add User to Group: You simply add the new analyst's IAM user to the finance-analysts-group.

Now, the analyst automatically inherits SELECT access to all current and future tables tagged with domain=finance, without you needing to grant permissions on each table individually. This scales governance effectively.


4. Completing the Governance Picture: Lineage and Auditing

A complete governance solution requires not only controlling access but also auditing it. You need to be able to answer: "Who accessed what data, and when?" This is where Lake Formation's auditing capabilities and the data lineage we discussed previously come together.

  • Data Lineage answers: Where did this data come from? What transformations has it undergone?
  • Auditing answers: Who has tried to access this data? Were they successful?

Lake Formation provides a centralized view of access attempts and integrates natively with AWS CloudTrail to log all API calls and data access events.

AWS Lake Formation: Simplifying Data Lake Management ...

The LinkedIn article 'AWS Lake Formation: Simplifying Data Lake Management' summarizes the key governance and compliance features, explicitly connecting data lineage and audit logging.

Read the section titled 'Data Governance and Compliance.' Notice how it treats Data Lineage, Audit Logging, and Compliance Tagging as related pillars of a single governance strategy.

The combination of the permissions model, audit logs, and the lineage graph provides a powerful, 360-degree view of your data governance:

  • Permissions proactively control what can happen.
  • Audit Logs reactively record what did happen.
  • Lineage provides the context for why it happened by showing the data's journey.

For instance, if an audit log shows an unauthorized access attempt on a sensitive report, the lineage graph can help you immediately identify all the source datasets that feed into that report, allowing you to perform a full impact and risk assessment.


Conclusion

In this lesson, we've seen how AWS Lake Formation moves beyond simple access control to provide a comprehensive framework for data governance.

Key Takeaways:

  • Lake Formation centralizes data lake security, replacing complex and decentralized S3 bucket and IAM policies.
  • It uses a credential vending model to provide integrated services with temporary, scoped-down credentials for data access.
  • It enables fine-grained access control at the database, table, column, and even row/cell level.
  • Lake Formation Tag-Based Access Control (LF-TBAC) is a scalable mechanism for managing permissions in large, complex data lakes by attaching policies to metadata tags.
  • For complete governance, Lake Formation combines its robust permissions model with auditing via AWS CloudTrail and the data lineage information captured from services like AWS Glue.

Next Up:

We've just seen how critical audit logs are to the governance story and that Lake Formation integrates with AWS CloudTrail to create them. In our next lesson, we will dive deeper into this service itself to learn how to configure AWS CloudTrail for auditing data access and API calls to data services. This will give you the skills to set up and analyze the audit trails that are fundamental to security and compliance.