-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add celery broker configuration example using Amazon SQS #24019
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,20 @@ to work, you need to setup a Celery backend (**RabbitMQ**, **Redis**, ...) and | |
change your ``airflow.cfg`` to point the executor parameter to | ||
``CeleryExecutor`` and provide the related Celery settings. | ||
|
||
If you use Amazon SQS as a Celery broker, set environment variables like this: | ||
|
||
.. note:: | ||
Using Amazon SQS for a Celery backed in Airflow is experimental and use at your own risk. | ||
|
||
.. code-block:: bash | ||
|
||
export AIRFLOW__CELERY__BROKER_URL=sqs://@your_sqs_host | ||
|
||
# Celery's environment variables. | ||
export AWS_ACCESS_KEY_ID=your_aws_access_key_id | ||
export AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key | ||
export AWS_DEFAULT_REGION=your_aws_region | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if will be great if you can also mention this setting #21507 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I add environment variable |
||
|
||
For more information about setting up a Celery broker, refer to the | ||
exhaustive `Celery documentation on the topic <https://docs.celeryq.dev/en/latest/getting-started/>`_. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a note that this is experimental support/use at own risk. It would be great also to add something along "there are anecdotal evidences that Amazon SQS" might be used as the broker backend.
We do not run any tests for SQS as celery backend (as opposed to rabbitmq and redis - we have integration tests for both).
We do not want to give the users false impression that they can expect it to work and ask as question "I followed the documentation and it does not work" - unless we have CI/tests covering the scenario we are talking about.
Or maybe @ferruzzi @o-nikolas @john-jac - there could be some blog post or documentation from Amazon team to describe it. I believe MWAA uses SQS as broker and maybe one of you (or someone from the amazon developer relations team) coudl write a blog post on "How to use SQS as celery broker for Airflow? " that woudl be nice - and then any questions about it could come to Amazon- I am afraid until we make system tests/integration with Amazon, making a statement that "SQS works and here is the configuration" in Airlfow docs is a little too much "leap of faith" :)