Airflow Summit 2026 is coming August 31 - September 2 in Austin, TX. Register now to secure your spot!

airflow.providers.amazon.aws.triggers.dynamodb

Classes

DynamoDBValueSensorTrigger

Asynchronously poll a DynamoDB item until the given attribute matches one of the expected values.

Module Contents

class airflow.providers.amazon.aws.triggers.dynamodb.DynamoDBValueSensorTrigger(table_name, partition_key_name, partition_key_value, attribute_name, attribute_value, sort_key_name=None, sort_key_value=None, waiter_delay=60, aws_conn_id='aws_default', region_name=None, verify=None, botocore_config=None)[source]

Bases: airflow.triggers.base.BaseEventTrigger

Asynchronously poll a DynamoDB item until the given attribute matches one of the expected values.

The polling uses the low-level DynamoDB client (aiobotocore exposes clients only, not the boto3 resource API used by DynamoDBHook), so keys are sent as typed string attributes, matching the string-typed key parameters of DynamoDBValueSensor.

Parameters:
table_name[source]
partition_key_name[source]
partition_key_value[source]
attribute_name[source]
attribute_value[source]
sort_key_name = None[source]
sort_key_value = None[source]
waiter_delay = 60[source]
aws_conn_id = 'aws_default'[source]
region_name = None[source]
verify = None[source]
botocore_config = None[source]
serialize()[source]

Return the information needed to reconstruct this Trigger.

Returns:

Tuple of (class path, keyword arguments needed to re-instantiate).

Return type:

tuple[str, dict[str, Any]]

property hook: airflow.providers.amazon.aws.hooks.base_aws.AwsBaseHook[source]
property key: dict[str, Any][source]
async poke(client)[source]

Test the DynamoDB item for a matching attribute value, mirroring the sensor’s poke.

async run()[source]

Run the trigger in an asynchronous context.

The trigger should yield an Event whenever it wants to fire off an event, and return None if it is finished. Single-event triggers should thus yield and then immediately return.

If it yields, it is likely that it will be resumed very quickly, but it may not be (e.g. if the workload is being moved to another triggerer process, or a multi-event trigger was being used for a single-event task defer).

In either case, Trigger classes should assume they will be persisted, and then rely on cleanup() being called when they are no longer needed.

Was this entry helpful?