Skip to content

DataCellsFilter

Source: src/AWS/LakeFormation/DataCellsFilter.ts

A Lake Formation data cells filter — row- and column-level security on a Glue table. Grant SELECT on the filter (via Resource.DataCellsFilter) to give principals access to only the filtered cells.

Creating filters requires SELECT with the grant option on the table (or data lake administrator) — see AWS.LakeFormation.DataLakeSettings.

Column Filter Hiding PII

import * as AWS from "alchemy/AWS";
const filter = yield* AWS.LakeFormation.DataCellsFilter("NoPii", {
databaseName: database.databaseName,
tableName: table.tableName,
excludedColumnNames: ["email", "ssn"],
});

Row Filter by Country

const filter = yield* AWS.LakeFormation.DataCellsFilter("UsOnly", {
databaseName: database.databaseName,
tableName: table.tableName,
rowFilter: { filterExpression: "country = 'US'" },
});