Lesson 4 of 6 Data Security

Choosing the Right Authorisation Layer: IAM, Redshift or Lake Formation

This lesson explains how authorisation decides exactly what each person or service may do with which data, and how IAM, database permissions and Lake Formation handle different levels of detail.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish the IAM, Lake Formation and database authorisation layers.
  • Distinguish RBAC, ABAC and tag-based access control.
  • Choose the layer for an access requirement.

Layers of authorisation

Access to data is controlled in three layers. IAM controls access to AWS APIs and resources: least-privilege policies are scoped to particular buckets, prefixes, Glue tables and KMS keys. Attribute-based access control (ABAC) grants access by matching tags, permissions boundaries cap what delegated administrators can grant, and IAM Access Analyzer can generate a policy from a role's actual activity.

Amazon Redshift controls access inside the warehouse with users, groups and roles, GRANT and REVOKE, column privileges, row-level security and dynamic data masking. AWS Lake Formation controls access to the data lake at the database, table, column, row and cell level, enforced consistently across Athena, Redshift Spectrum, EMR, Glue and Quick Sight, with LF-Tags and cross-account grants. The following table summarises the layers.

LayerControlsFeatures
IAMAccess to AWS APIs and resourcesLeast-privilege policies scoped to buckets, prefixes, Glue tables and KMS keys; ABAC with tags; permissions boundaries; Access Analyzer policy generation from real activity
Amazon RedshiftAccess inside the warehouseUsers, groups and roles with GRANT and REVOKE; column privileges; row-level security; dynamic data masking; default privileges
AWS Lake FormationAccess to the data lakeDatabase, table, column, row and cell permissions enforced across Athena, Spectrum, EMR, Glue and Quick Sight; LF-Tags; cross-account grants

The following diagram matches each requirement to its layer.

Each requirement mapped to its authorisation layer. IAM controls which AWS resources a role can use, such as the S3 prefix a Glue job may write. Lake Formation controls access to lake data, by column or by LF-Tags across hundreds of tables. Redshift controls access inside the warehouse with GRANT and row-level security.
IAM is usually combined with one of the finer-grained layers.
Sort into groups

Which authorisation layer?

Exam skills 4.2.1 · 4.2.3 · 4.2.4

Decide which layer controls each kind of access.

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

Access control models

Permissions can be organised in three ways. Role-based access control (RBAC) grants permissions to job roles, such as analyst or data engineer, and users receive the roles they need. Tag-based control, with LF-Tags and resource tags, grants access to everything carrying a tag, so new resources are covered as soon as they are tagged. Attribute-based access control (ABAC) compares attributes of the user, such as department, with attributes of the data, so one policy serves every department instead of one policy each. The following table summarises the models.

ModelHow it grants access
Role-based (RBAC)By job role
Tag-basedBy LF-Tags and resource tags
Attribute-based (ABAC)By comparing user attributes, such as department, with data attributes

In practice, coarse IAM permissions are combined with fine-grained Lake Formation or Redshift permissions.

Match the pairs

Access control models

Exam skills 4.2.5

Match each access control model with how it grants access.

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

Choosing the right authorisation layer

Each access requirement is best enforced at a particular authorisation layer. The following table identifies the appropriate layer for several requirements.

RequirementLayer
A Glue job may write only to s3://lake/curated/sales/IAM policy on the job's role
Analysts may see all columns of a lake table except salaryLake Formation column-level permission
A Redshift user may query only the finance schemaRedshift GRANT on the schema
Regional managers see only their region's rows in RedshiftRedshift row-level security policy
Hundreds of tables restricted by sensitivityLake Formation tag-based access control (LF-Tags)

IAM controls access to AWS resources; Lake Formation and Redshift control access to data inside them. Data engineering questions usually turn on choosing the finest-grained layer that meets the requirement.

Check yourself

How is each Region shown only its own rows in a Redshift table?

Show answer

With row-level security policies.

Exam Tips

Remember for the exam

  • Column-level security in the data lake points to Lake Formation.
  • To scale lake permissions by classification, use LF-Tags.
  • To show each Region only its own rows in Redshift, use row-level security policies.
  • To build a least-privilege policy from real activity, use Access Analyzer policy generation.
  • For the same lake permissions across Athena, EMR and Spectrum, use Lake Formation.