Based on the DEA-C01 exam guideReport an error
lakeformation:GetDataAccess.SELECT).The starting point of data security is access control, which decides "who can access what." In an AWS analytics environment, IAM handles broad permissions at the service API level, and Lake Formation handles fine-grained permissions at the catalog level.
| Policy type | Attached to | Role |
|---|---|---|
| Identity-based policy | Users, groups, roles | What this principal can do |
| Resource-based policy | S3 buckets, KMS keys, roles (trust policy), etc. | Who can access this resource |
| Permissions boundary | Users, roles | The upper limit of the permissions an identity-based policy can grant |
| Service control policy (SCP) | Accounts and OUs in an organization | An upper limit that no one in the account can exceed |
*) and narrow the scope with Resource and Condition.{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowReadSpecificPrefix",
"Effect": "Allow",
"Action": ["s3:GetObject"],
"Resource": "arn:aws:s3:::lake-curated/sales/*",
"Condition": {
"StringEquals": { "aws:RequestedRegion": "ap-northeast-2" }
}
}
]
}💡 Related theory: IAM evaluation logic is "explicit Deny > explicit Allow > implicit deny." If any policy contains a matching Deny, the request is blocked immediately, and if no policy has an Allow, it ends with the default implicit deny. Permissions boundaries and SCPs do not grant permissions. They only trim the range that can be granted.
| Situation | Condition for allowing |
|---|---|
| Access within the same account | Either the identity-based policy or the resource-based policy allows it (there must be no Deny anywhere) |
| Access to a resource in another account | The identity-based policy in the requester's account and the resource-based policy in the resource's account must both allow it |
Lake Formation manages permissions on Glue Data Catalog databases, tables, and columns in one place. The core of how it works is registering S3 locations and credential vending.
① The administrator registers an S3 location with Lake Formation (specifying, at registration, the role that can read and write that location)
② A user runs a query with Athena
③ Athena sends a request to Lake Formation → Lake Formation checks permissions (table, column, row)
④ If the check passes, Lake Formation issues Athena temporary credentials created by assuming the registered role
⑤ Athena reads S3 with those credentials, but returns only the permitted columns and rows to the userlakeformation:GetDataAccess. This permission supports only * as its Resource. Athena requires it on the user themselves, while other integrated services require it on the execution role.s3:GetObject through IAM, they can download the raw files of a table that has a column filter. To enforce control with Lake Formation, remove the S3 permissions for the direct path.User request → [Pass the IAM policy?] → [Pass the Lake Formation permission?] → Data access
If either one denies, the request is blockedFor compatibility with existing Glue users, Lake Formation is effectively turned off at first.
IAMAllowedPrincipals group holds the Super permission.| Symptom | Cause |
|---|---|
| You granted column permissions, but the user sees all columns | Super for IAMAllowedPrincipals remains on the table |
| Control does not apply only to newly created tables | The default permission settings for new resources were not changed |
IAMAllowedPrincipals permission on existing resources.| Permission | Target | Meaning |
|---|---|---|
SELECT / INSERT / DELETE | Table | Read, write, and delete the underlying data |
DESCRIBE | Database, table | View metadata |
ALTER / DROP | Database, table | Change or delete the definition |
CREATE_TABLE | Database | Create tables |
DATA_LOCATION_ACCESS | Registered S3 location | Can create catalog resources that point to that location |
Super | Everything | All operations on that resource |
with grant option, the recipient can pass the permission on to other principals.SELECT and INSERT are enough to read and write the data.| Level | Method | Example |
|---|---|---|
| Column level | Specify columns to include or exclude | Hide PII columns (email, ssn) |
| Row level | Row filter expression | See only rows for your own region |
| Cell level | Column specification + row filter | Only your region's rows, without PII |
All three levels are expressed with a single data filter (Data Cells Filter). You create the filter and then grant SELECT on that filter.
{
"Name": "analyst_kr_no_pii",
"TableCatalogId": "111122223333",
"DatabaseName": "sales",
"TableName": "orders",
"ColumnWildcard": { "ExcludedColumnNames": ["email", "ssn"] },
"RowFilter": { "FilterExpression": "region = 'ap-northeast-2'" }
}aws lakeformation grant-permissions \
--principal DataLakePrincipalIdentifier=arn:aws:iam::111122223333:role/RegionAnalyst \
--permissions SELECT \
--resource '{"DataCellsFilter":{"TableCatalogId":"111122223333","DatabaseName":"sales","TableName":"orders","Name":"analyst_kr_no_pii"}}'WHERE clause. Strings are wrapped in single quotes. To allow all rows, use the "all rows" wildcard.SELECT is the only permission you can grant together with a filter.With named-resource permissions, the number of GRANT statements multiplies as users and tables increase. LF-Tags attach tags to resources and grant permissions on tag values.
{
"TagPolicy": {
"Expression": [
{ "TagKey": "sensitivity", "TagValues": ["public", "internal"] },
{ "TagKey": "domain", "TagValues": ["sales"] }
],
"Permissions": ["SELECT", "DESCRIBE"]
}
}sensitivity is public or internal and whose domain is sales. Keys are combined with AND, and values of a single key are combined with OR. Resources with sensitivity=confidential are automatically excluded.sensitivity=confidential to just one column, only that column is excluded, giving you column-level control.| Comparison | Named-resource permissions | LF-Tags (TBAC) |
|---|---|---|
| Unit of granting | Resource name | Tag expression |
| Number of operations needed | Number of principals × number of resources | Number of principals + number of resources |
| New table | Add a GRANT every time | Just attach the tags |
| Suitable scale | Few, fixed tables | Many tables that keep growing |
| Method | How it works | Caveats |
|---|---|---|
| Lake Formation cross-account sharing | Grant catalog resources directly to another account, organization, or OU, or to an IAM principal in the other account. Internally it is shared through AWS RAM | Within the same organization it can be used immediately; outside the organization, the other account must accept the RAM invitation |
| S3 bucket policy | Allow a principal from the other account on the bucket | No fine-grained control. The other account's identity-based policy is also required |
| Role assumption (AssumeRole) | Let an external account assume a role through the trust policy | Both the role's permission policy and the sts:AssumeRole permission on the other side are required |
{
"Effect": "Allow",
"Principal": { "AWS": "arn:aws:iam::444455556666:root" },
"Action": "sts:AssumeRole"
}aws/s3) cannot have its key policy changed, so it cannot be used for cross-account sharing.💡 Related theory: Cross-account access succeeds only when both the "trusting side (trust policy)" and the "permission-granting side (permission policy)" are configured. For encrypted data, the KMS key policy must also be right, so all three layers must line up. If a question says two of them are correct but access still fails, the remaining one is the answer.
| Symptom | Cause | Action |
|---|---|---|
| IAM is sufficient but Athena says "Insufficient permissions" | No SELECT or DESCRIBE in Lake Formation | Grant permissions on the table (or filter) |
| Lake Formation permissions exist but access is denied | The lakeformation:GetDataAccess IAM permission is missing | Add it to the user or execution role |
| Columns were hidden but everything is visible | Super for IAMAllowedPrincipals remains | Revoke it and change the default settings |
| A filter is applied but the user downloaded the raw files | The user has direct S3 permissions | Remove direct access from the IAM and bucket policies |
| A shared table does not appear in Athena | RAM invitation not accepted, or no resource link | Accept the invitation and create a resource link |
| Cross-account query fails at the decryption step | The other principal is not in the KMS key policy | Allow kms:Decrypt in the key policy |
| Permission requests pile up with every new table | Named-resource permission operations | Switch to LF-Tags |
| Clue in the question | Correct answer |
|---|---|
| "IAM policies allow everything, but table queries are denied" | Missing Lake Formation permission |
| "Exclude PII columns + only your own region's rows" | Data filter (cell level) |
| "Hundreds of tables added every week, remove the GRANT burden" | LF-Tags (TBAC) |
| "Share catalog tables with another account with fine-grained control" | Lake Formation cross-account sharing (RAM) |
| "Cross-account + failure to access encrypted data" | KMS key policy |
| "When Deny and Allow are both present" | Explicit Deny takes precedence |
| "Migrate gradually without breaking existing IAM-based workloads" | Hybrid access mode |
| "Prevent arbitrary creation of tables over a sensitive S3 path" | Data location permission |
Tomorrow we cover the layer that protects data even after access has been granted: KMS and per-service encryption.
Click a choice to reveal the answer and explanation.
Question 1
An analyst tries to query a Glue catalog table with Athena and gets an "Insufficient permissions" error. The IAM policy allows athena:*, glue:GetTable, and s3:GetObject. What is the most likely cause?
Question 2
In a data lake where hundreds of tables are added every week, you want to eliminate the operational burden of adding per-user GRANT statements every time a new table is created. What is the most appropriate access control method?
Question 3
You want to show an analyst the orders table without the PII columns (email, ssn) and only the rows for their own region (region). Which single Lake Formation feature should you use?
Question 4
Cross-account sharing has been set up so that a role in Account B can query a data lake table in Account A. The data is encrypted with a KMS CMK. What is a common cause of access still failing?
Question 5
Which statement about IAM policy evaluation is correct?