SQSSensor

Amazon

Get messages from an SQS queue and then deletes the message from the SQS queue. If deletion of messages fails an AirflowException is thrown otherwise, the message is pushed through XCom with the key message.

View Source

Last Updated: May. 7, 2021

Access Instructions

Install the Amazon provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

aws_conn_idstrAWS connection id
sqs_queuestrThe SQS queue url (templated)
max_messagesintThe maximum number of messages to retrieve for each poke (templated)
wait_time_secondsintThe time in seconds to wait for receiving messages (default: 1 second)

Documentation

Get messages from an SQS queue and then deletes the message from the SQS queue. If deletion of messages fails an AirflowException is thrown otherwise, the message is pushed through XCom with the key message.

Example DAGs

Improve this module by creating an example DAG.

View Source
  1. Add an `example_dags` directory to the top-level source of the provider package with an empty `__init__.py` file.
  2. Add your DAG to this directory. Be sure to include a well-written and descriptive docstring
  3. Create a pull request against the source code. Once the package gets released, your DAG will show up on the Registry.

Was this page helpful?