CfnDataLakeSettingsProps Struct
Properties for defining a CfnDataLakeSettings.
Example
import * as cdk from 'aws-cdk-lib';
import { S3Table, Database, DataFormat, Schema } from 'aws-cdk-lib/aws-glue';
import { CfnDataLakeSettings, CfnTag, CfnTagAssociation } from 'aws-cdk-lib/aws-lakeformation';
declare const stack: cdk.Stack;
declare const accountId: string;
const tagKey = 'aws';
const tagValues = ['dev'];
const database = new Database(this, 'Database');
const table = new S3Table(this, 'Table', {
database,
columns: [
{
name: 'col1',
type: Schema.STRING,
},
{
name: 'col2',
type: Schema.STRING,
}
],
dataFormat: DataFormat.CSV,
});
const synthesizer = stack.synthesizer as cdk.DefaultStackSynthesizer;
new CfnDataLakeSettings(this, 'DataLakeSettings', {
admins: [
{
dataLakePrincipalIdentifier: stack.formatArn({
service: 'iam',
resource: 'role',
region: '',
account: accountId,
resourceName: 'Admin',
}),
},
{
// The CDK cloudformation execution role.
dataLakePrincipalIdentifier: synthesizer.cloudFormationExecutionRoleArn.replace('${AWS::Partition}', 'aws'),
},
],
});
const tag = new CfnTag(this, 'Tag', {
catalogId: accountId,
tagKey,
tagValues,
});
const lfTagPairProperty: CfnTagAssociation.LFTagPairProperty = {
catalogId: accountId,
tagKey,
tagValues,
};
const tagAssociation = new CfnTagAssociation(this, 'TagAssociation', {
lfTags: [lfTagPairProperty],
resource: {
tableWithColumns: {
databaseName: database.databaseName,
columnNames: ['col1', 'col2'],
catalogId: accountId,
name: table.tableName,
}
}
});
tagAssociation.node.addDependency(tag);
tagAssociation.node.addDependency(table);
Properties
adminsIResolvable | IResolvable | CfnDataLakeSettings.DataLakePrincipalProperty[]adminstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataLakePrincipalProperty]]]adminsIResolvableAdminsIResolvableAdminsinterface{}#allowExternalDataFilteringboolean | IResolvableallow_external_data_filteringtyping.Union[bool, IResolvable]allowExternalDataFilteringBooleanAllowExternalDataFilteringboolAllowExternalDataFilteringinterface{}#notes
If set to true, you allow Amazon EMR clusters or other third-party engines to access data in Amazon S3 locations that are registered with Lake Formation .
If false or null, no third-party query engines will be able to access data in Amazon S3 locations that are registered with Lake Formation.
For more information, see External data filtering setting .
allowFullTableExternalDataAccessboolean | IResolvableallow_full_table_external_data_accesstyping.Union[bool, IResolvable]allowFullTableExternalDataAccessBooleanAllowFullTableExternalDataAccessboolAllowFullTableExternalDataAccessinterface{}#authorizedSessionTagValueListstring[]authorized_session_tag_value_listtyping.List[str]authorizedSessionTagValueListList<String>AuthorizedSessionTagValueListstring[]AuthorizedSessionTagValueList*[]*string#notes
Lake Formation will publish the acceptable key-value pair, for example key = "LakeFormationTrustedCaller" and value = "TRUE" and the third party integrator must properly tag the temporary security credentials that will be used to call Lake Formation 's administrative API operations.
createDatabaseDefaultPermissionsIResolvable | IResolvable | CfnDataLakeSettings.PrincipalPermissionsProperty[]create_database_default_permissionstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PrincipalPermissionsProperty]]]createDatabaseDefaultPermissionsIResolvableCreateDatabaseDefaultPermissionsIResolvableCreateDatabaseDefaultPermissionsinterface{}#notes
A null value indicates that the access is controlled by Lake Formation permissions. ALL permissions assigned to IAM_ALLOWED_PRINCIPALS group indicates that the user's IAM permissions determine the access to the database. This is referred to as the setting "Use only IAM access control," and is to support backward compatibility with the AWS Glue permission model implemented by IAM permissions.
The only permitted values are an empty array or an array that contains a single JSON object that grants ALL to IAM_ALLOWED_PRINCIPALS .
For more information, see Changing the default security settings for your data lake .
createTableDefaultPermissionsIResolvable | IResolvable | CfnDataLakeSettings.PrincipalPermissionsProperty[]create_table_default_permissionstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, PrincipalPermissionsProperty]]]createTableDefaultPermissionsIResolvableCreateTableDefaultPermissionsIResolvableCreateTableDefaultPermissionsinterface{}#notes
A null value indicates that the access is controlled by Lake Formation permissions. ALL permissions assigned to IAM_ALLOWED_PRINCIPALS group indicate that the user's IAM permissions determine the access to the table. This is referred to as the setting "Use only IAM access control," and is to support the backward compatibility with the AWS Glue permission model implemented by IAM permissions.
The only permitted values are an empty array or an array that contains a single JSON object that grants ALL permissions to IAM_ALLOWED_PRINCIPALS .
For more information, see Changing the default security settings for your data lake .
externalDataFilteringAllowListIResolvable | IResolvable | CfnDataLakeSettings.DataLakePrincipalProperty[]external_data_filtering_allow_listtyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataLakePrincipalProperty]]]externalDataFilteringAllowListIResolvableExternalDataFilteringAllowListIResolvableExternalDataFilteringAllowListinterface{}#If you choose
REPLACE, your current data lake settings will be replaced with the new values in your template.
CrossAccountVersion is the key you can configure in the Parameters field. Accepted values for the CrossAccountVersion key are 1, 2, 3, and 4.
readOnlyAdminsIResolvable | IResolvable | CfnDataLakeSettings.DataLakePrincipalProperty[]read_only_adminstyping.Union[IResolvable, typing.List[typing.Union[IResolvable, DataLakePrincipalProperty]]]readOnlyAdminsIResolvableReadOnlyAdminsIResolvableReadOnlyAdminsinterface{}#trustedResourceOwnersstring[]trusted_resource_ownerstyping.List[str]trustedResourceOwnersList<String>TrustedResourceOwnersstring[]TrustedResourceOwners*[]*string#notes
A list of the resource-owning account IDs that the caller's account can use to share their user access details (user ARNs). The user ARNs can be logged in the resource owner's CloudTrail log. You may want to specify this property when you are in a high-trust boundary, such as the same team or company.