airflow.providers.amazon.aws.operators.sqs

Publish message to SQS queue

Module Contents

class airflow.providers.amazon.aws.operators.sqs.SQSPublishOperator(*, sqs_queue: str, message_content: str, message_attributes: Optional[dict] = None, delay_seconds: int = 0, aws_conn_id: str = 'aws_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Publish message to a SQS queue.

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

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

  • message_attributes (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)

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

template_fields = ['sqs_queue', 'message_content', 'delay_seconds'][source]
ui_color = #6ad3fa[source]
execute(self, context)[source]

Publish the message to SQS queue

Parameters

context (dict) -- 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?