AWS Lake Formation

2026/11/19 - AWS Lake Formation - 2 updated api methods

Changes  Adds Status and StatusReason to RLSPolicy in GetRLSPolicy and ListRLSPolicies, indicating whether a row-level security policy is valid or references a deleted lookup table or user-defined function

GetRLSPolicy (updated) Link ¶
Changes (response)
{'RLSPolicy': {'Status': 'VALID | INVALID',
               'StatusReason': 'REFERENCED_UDF_DELETED | '
                               'REFERENCED_LOOKUP_TABLE_DELETED'}}

Returns the definition of a row-level security policy, including its attachment columns and filter expression.

See also: AWS API Documentation

Request Syntax

client.get_rls_policy(
    Name='string'
)
type Name:

string

param Name:

[REQUIRED]

The name of the row-level security policy to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'RLSPolicy': {
        'CatalogId': 'string',
        'Name': 'string',
        'AttachmentColumns': [
            {
                'Name': 'string',
                'Type': 'string'
            },
        ],
        'FilterExpression': 'string',
        'Status': 'VALID'|'INVALID',
        'StatusReason': 'REFERENCED_UDF_DELETED'|'REFERENCED_LOOKUP_TABLE_DELETED'
    }
}

Response Structure

  • (dict) --

    • RLSPolicy (dict) --

      An RLSPolicy structure containing the definition of the requested row-level security policy.

      • CatalogId (string) --

        The identifier for the Data Catalog that contains the policy. By default, the account ID.

      • Name (string) --

        The name of the row-level security policy.

      • AttachmentColumns (list) --

        The list of columns that the filter expression references.

        • (dict) --

          A column in a table that a row-level security policy's filter expression can reference.

          • Name (string) --

            The name of the column.

          • Type (string) --

            The data type of the column.

      • FilterExpression (string) --

        The filter predicate, written in a SQL-like syntax, that determines which rows are returned to the principal.

      • Status (string) --

        Whether the row-level security policy can be evaluated. VALID means that every lookup table and user-defined function the filter expression references exists. INVALID means that a lookup table or user-defined function the filter expression references was deleted.

      • StatusReason (string) --

        The reason the row-level security policy is INVALID. REFERENCED_LOOKUP_TABLE_DELETED means that a lookup table the filter expression references was deleted. REFERENCED_UDF_DELETED means that a user-defined function the filter expression references was deleted. Not returned when the status is VALID.

ListRLSPolicies (updated) Link ¶
Changes (response)
{'RLSPolicies': {'Status': 'VALID | INVALID',
                 'StatusReason': 'REFERENCED_UDF_DELETED | '
                                 'REFERENCED_LOOKUP_TABLE_DELETED'}}

Lists the row-level security policies in the Data Catalog.

See also: AWS API Documentation

Request Syntax

client.list_rls_policies(
    MaxResults=123,
    NextToken='string'
)
type MaxResults:

integer

param MaxResults:

The maximum number of row-level security policies to return in a single response.

type NextToken:

string

param NextToken:

A continuation token, if this is a continuation call.

rtype:

dict

returns:

Response Syntax

{
    'RLSPolicies': [
        {
            'CatalogId': 'string',
            'Name': 'string',
            'AttachmentColumns': [
                {
                    'Name': 'string',
                    'Type': 'string'
                },
            ],
            'FilterExpression': 'string',
            'Status': 'VALID'|'INVALID',
            'StatusReason': 'REFERENCED_UDF_DELETED'|'REFERENCED_LOOKUP_TABLE_DELETED'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • RLSPolicies (list) --

      A list of RLSPolicy structures.

      • (dict) --

        A structure that describes a row-level security policy, including the columns its filter expression references and the filter expression itself.

        • CatalogId (string) --

          The identifier for the Data Catalog that contains the policy. By default, the account ID.

        • Name (string) --

          The name of the row-level security policy.

        • AttachmentColumns (list) --

          The list of columns that the filter expression references.

          • (dict) --

            A column in a table that a row-level security policy's filter expression can reference.

            • Name (string) --

              The name of the column.

            • Type (string) --

              The data type of the column.

        • FilterExpression (string) --

          The filter predicate, written in a SQL-like syntax, that determines which rows are returned to the principal.

        • Status (string) --

          Whether the row-level security policy can be evaluated. VALID means that every lookup table and user-defined function the filter expression references exists. INVALID means that a lookup table or user-defined function the filter expression references was deleted.

        • StatusReason (string) --

          The reason the row-level security policy is INVALID. REFERENCED_LOOKUP_TABLE_DELETED means that a lookup table the filter expression references was deleted. REFERENCED_UDF_DELETED means that a user-defined function the filter expression references was deleted. Not returned when the status is VALID.

    • NextToken (string) --

      A continuation token, if not all row-level security policies have been returned.