AWS::LakeFormation::Tag - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


The AWS::LakeFormation::Tag resource represents an LF-tag, which consists of a key and one or more possible values for the key. During a stack operation, Amazon CloudFormation calls the Amazon Lake Formation CreateLFTag API to create a tag, and UpdateLFTag API to update a tag resource, and a DeleteLFTag to delete it.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Type" : "AWS::LakeFormation::Tag", "Properties" : { "CatalogId" : String, "TagKey" : String, "TagValues" : [ String, ... ] } }


Type: AWS::LakeFormation::Tag Properties: CatalogId: String TagKey: String TagValues: - String



Catalog id string, not less than 1 or more than 255 bytes long, matching the single-line string pattern.

The identifier for the Data Catalog. By default, the account ID. The Data Catalog is the persistent metadata store. It contains database definitions, table definitions, and other control information to manage your Amazon Lake Formation environment.

Required: No

Type: String

Minimum: 12

Maximum: 12

Update requires: Replacement


UTF-8 string, not less than 1 or more than 255 bytes long, matching the single-line string pattern.

The key-name for the LF-tag.

For more information about using the Ref function, see Ref.

Required: Yes

Type: String

Pattern: ^([{a-zA-Z}{\s}{0-9}_.:\/=+\-@%]*)$

Minimum: 1

Maximum: 128

Update requires: Replacement


An array of UTF-8 strings, not less than 1 or more than 50 strings.

A list of possible values of the corresponding TagKey of an LF-tag key-value pair.

Required: Yes

Type: Array of String

Minimum: 1

Maximum: 50

Update requires: No interruption

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the Tag’s TagKey property value.

For example: tagKeyName


Note the following:

Only data lake administrators can create LF-tags.

An LF-tag can be assigned to Data Catalog resources (databases, tables, and columns) via AWS::LakeFormation::TagAssociation to implement tag-based access control.


Creating a tag resource in a template

The following example demonstrates how to define a tag resource in a template.


{ "SampleTag": { "Type": "AWS::LakeFormation::Tag", "Properties": { "TagKey": "sample_tag_key", "TagValues": ["sample_tag_value1", "sample_tag_value2"] } } }


SampleTag: Type: AWS::LakeFormation::Tag Properties: TagKey: "sample_tag_key" TagValues: - "sample_tag_value1" - "sample_tag_value2"

See also

Assign an LF-tag to a Data Catalog resource - AWS::LakeFormation::TagAssociation.