Airflow Summit 2025 is coming October 07-09. Register now to secure your spot!

airflow.providers.amazon.aws.queues.sqs

Attributes

QUEUE_REGEXP

Classes

SqsMessageQueueProvider

Configuration for SQS integration with common-messaging.

Module Contents

airflow.providers.amazon.aws.queues.sqs.QUEUE_REGEXP = '^https://sqs\\.[^.]+\\.amazonaws\\.com/[0-9]+/.+'[source]
class airflow.providers.amazon.aws.queues.sqs.SqsMessageQueueProvider[source]

Bases: airflow.providers.common.messaging.providers.base_provider.BaseMessageQueueProvider

Configuration for SQS integration with common-messaging.

[START sqs_message_queue_provider_description]

  • It uses sqs as scheme for identifying SQS queues.

  • For parameter definitions take a look at SqsSensorTrigger.

from airflow.providers.common.messaging.triggers.msg_queue import MessageQueueTrigger
from airflow.sdk import Asset, AssetWatcher

trigger = MessageQueueTrigger(
    scheme="sqs",
    # Additional AWS SqsSensorTrigger parameters as needed
    sqs_queue="https://sqs.us-east-1.amazonaws.com/123456789012/my-queue",
    aws_conn_id="aws_default",
)

asset = Asset("sqs_queue_asset", watchers=[AssetWatcher(name="sqs_watcher", trigger=trigger)])

For a complete example, see: tests.system.amazon.aws.example_dag_sqs_message_queue_trigger

[END sqs_message_queue_provider_description]

scheme = 'sqs'[source]
queue_matches(queue)[source]

Return whether a given queue (string) matches a specific provider’s pattern.

This function must be as specific as possible to avoid collision with other providers. Functions in this provider should NOT overlap with each other in their matching criteria.

Parameters:

queue (str) – The queue identifier

trigger_class()[source]

Trigger class to use when queue_matches returns True.

trigger_kwargs(queue, **kwargs)[source]

Parameters passed to the instance of trigger_class.

Parameters:

queue (str) – The queue identifier

Was this entry helpful?