Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
AWS · DEA-C01

Authorization

DEA-C01 · Lesson 20 of 23 · 2:55:50

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Prepare for the DEA-C01 exam (AWS Certified Data Engineer – Associate). In this lesson: AWS managed and customer managed policies and least privilege, IAM Access Analyzer policy generation and last accessed information, Systems Manager Parameter Store and Secrets Manager, Redshift privileges for users, groups, and roles down to single columns, and AWS Lake Formation permissions with data filters, LF-Tags, and attribute-based access control. Includes three original practice questions.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Full access everywhere

AnyCompany Games gives its pipeline roles AWS managed policies with full access, because they are quick to attach. In Redshift, the administrator grants select to each analyst, one table at a time, and in the data lake, the analysts of every studio can see every table. This lesson covers custom policies, stored credentials, database permissions, and Lake Formation.

Custom policies and least privilege

There are three kinds of identity-based policies: AWS managed policies, which AWS writes and maintains, customer managed policies, which you create and change in your account, and inline policies, embedded in a single user, group, or role. AWS managed policies are a quick start, but they are written for many customers, so they often allow more actions or resources than a pipeline needs. When a managed policy does not meet the needs, write a custom, customer managed policy, for example by copying a managed policy and keeping only the actions and resource ARNs that the job needs. That is least privilege: only the actions, on only the resources, that a task requires, with conditions when they help. IAM Access Analyzer can generate a policy from the access activity in your CloudTrail logs, and last accessed information shows the permissions that a role never uses, so you can remove them.

Storing credentials

Pipelines need credentials and settings for databases and APIs, and two services store them: the Parameter Store of AWS Systems Manager, and AWS Secrets Manager. Parameter Store holds String, StringList, and SecureString parameters, and a SecureString parameter is encrypted with a KMS key. Parameters can be organized in hierarchies, with a path for each environment and application. For database credentials, API keys, and tokens, AWS recommends Secrets Manager, with automatic rotation and replication across Regions. So a simple rule: Parameter Store for configuration, like an endpoint or a bucket name, and Secrets Manager for secrets that must rotate.

Database permissions in Redshift

Inside Amazon Redshift, access is a matter of database permissions: the grant command gives users, groups, or roles privileges on schemas, tables, views, and even columns. A group collects users who all receive the permissions of the group, for example one group for analysts and one for the support team. With role-based access control, you create a role, grant it privileges, like select on a schema or create table, and then grant the role to users. Permissions are granted and revoked at the role level, so a new analyst only needs the role, and roles can also allow commands that used to require a superuser. Column-level grants go further: a role can select the player IDs and countries of a table, but not its email addresses.

Lake Formation and access models

For the data lake, AWS Lake Formation grants and revokes permissions on Data Catalog databases, tables, and columns, and on the S3 locations of their data, much like a database. Integrated engines enforce these permissions: Athena users query only what they are granted, Redshift Spectrum honors them through an external schema, and EMR honors them with a runtime role. Data filters add row-level, column-level, and cell-level security, for example only the rows of one region, without the email column. Beyond role-based grants, tag-based access control attaches LF-Tags to databases, tables, and columns, and grants access on tag values, which AWS recommends when there are many catalog objects. In IAM, attribute-based access control uses tags on principals and resources: a policy allows access when the tag of the role matches the tag of the resource, so new resources need no change to the policy.

Authorization at AnyCompany Games

Here is the plan at AnyCompany Games: each pipeline role gets a customer managed policy, first generated by Access Analyzer from its activity, then reviewed. API endpoints are kept in Parameter Store, and database passwords in Secrets Manager. In Redshift, an analysts role reads the reporting schema, with a column grant that leaves out email addresses. And in the data lake, LF-Tags by studio grant access to tables, and a data filter gives the support team only the rows of its region.

Recap

Let's recap. When an AWS managed policy grants too much, write a customer managed policy with only the actions and resources that the task needs. IAM Access Analyzer generates policies from CloudTrail activity, and last accessed information shows what to remove. Parameter Store holds configuration, with SecureString for encrypted values, and Secrets Manager holds credentials that rotate. In Redshift, grant privileges to users, groups, and roles, down to single columns. And Lake Formation permissions are enforced by Athena, EMR, and Redshift Spectrum, with data filters, LF-Tags, and attribute-based policies in IAM.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. A Glue job role has an AWS managed policy with full access to S3. The job only reads the raw prefix of one bucket and writes to its curated prefix. What should the data engineer do?

    • Attach a second AWS managed policy that gives read-only S3 access
    • Replace it with a customer managed policy for the two prefixes
    • Add the role to an IAM user group with read-only access
    • Store the bucket name in a Parameter Store SecureString
    Show the answer

    Replace it with a customer managed policy for the two prefixes

    A customer managed policy allows only reading the raw prefix and writing the curated prefix, which is least privilege. “Attach a second AWS managed policy that gives read-only S3 access” would add permissions, and the full access would remain. “Add the role to an IAM user group with read-only access” would not work, because IAM groups contain users, not roles. And “Store the bucket name in a Parameter Store SecureString” would store a value, without changing any permission.

  2. In Amazon Redshift, twenty analysts need select on the tables of the reporting schema, and new analysts join every month. Today, the administrator grants select to each user, table by table. What should the data engineer set up?

    • A database role with select, granted to each analyst
    • Superuser status for every analyst who joins the team
    • A customer managed IAM policy attached to each analyst
    • A Secrets Manager secret that holds each analyst's password
    Show the answer

    A database role with select, granted to each analyst

    Permissions are granted and revoked at the role level, so each new analyst only needs the role. “Superuser status for every analyst who joins the team” would give far more power than reading reports. “A customer managed IAM policy attached to each analyst” would grant IAM permissions, while table privileges are granted inside the database. And “A Secrets Manager secret that holds each analyst's password” would store passwords, without granting any privilege.

  3. The data lake has hundreds of tables in the Data Catalog, and new tables arrive every week. Each studio team must query in Athena only the tables of its own studio, with no new grant for each new table. What should the data engineer use?

    • An S3 bucket policy for each table, edited by the team
    • An inline IAM policy for each user, listing each table
    • A Redshift group for each studio, with select on its tables
    • LF-Tags by studio on tables, with grants on the tag values
    Show the answer

    LF-Tags by studio on tables, with grants on the tag values

    With tag-based access control, a new table with the tag of the studio falls under the existing grant, and Athena enforces Lake Formation permissions. “An S3 bucket policy for each table, edited by the team” would mean a new policy for every new table. “An inline IAM policy for each user, listing each table” would mean editing the policy of every user for each new table. And “A Redshift group for each studio, with select on its tables” would grant privileges inside Redshift, not on the tables of the data lake.