airflow.contrib.operators.aws_sqs_publish_operator

Publish message to SQS queue

Module Contents

class airflow.contrib.operators.aws_sqs_publish_operator.SQSPublishOperator(sqs_queue, message_content, message_attributes=None, delay_seconds=0, aws_conn_id='aws_default', *args, **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?