airflow.providers.amazon.aws.operators.sqs

Publish message to SQS queue

Module Contents

Classes

SqsPublishOperator

Publish a message to an Amazon SQS queue.

class airflow.providers.amazon.aws.operators.sqs.SqsPublishOperator(*, sqs_queue, message_content, message_attributes=None, delay_seconds=0, message_group_id=None, aws_conn_id='aws_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Publish a message to an Amazon SQS queue.

See also

For more information on how to use this operator, take a look at the guide: Publish a message to an Amazon SQS queue

Parameters
  • sqs_queue (str) -- The SQS queue url (templated)

  • message_content (str) -- The message content (templated)

  • message_attributes (Optional[dict]) -- additional attributes for the message (default: None) For details of the attributes parameter see botocore.client.SQS.send_message()

  • delay_seconds (int) -- message delay (templated) (default: 1 second)

  • message_group_id (Optional[str]) -- This parameter applies only to FIFO (first-in-first-out) queues. (default: None) For details of the attributes parameter see botocore.client.SQS.send_message()

  • aws_conn_id (str) -- AWS connection id (default: aws_default)

template_fields :Sequence[str] = ['sqs_queue', 'message_content', 'delay_seconds', 'message_attributes', 'message_group_id'][source]
template_fields_renderers[source]
ui_color = #6ad3fa[source]
execute(context)[source]

Publish the message to the Amazon SQS queue

Parameters

context (airflow.utils.context.Context) -- the context object

Returns

dict with information about the message sent For details of the returned dict see botocore.client.SQS.send_message()

Return type

dict

Was this entry helpful?