airflow.providers.amazon.aws.operators.sns

Publish message to SNS queue

Module Contents

Classes

SnsPublishOperator

Publish a message to Amazon SNS.

class airflow.providers.amazon.aws.operators.sns.SnsPublishOperator(*, target_arn, message, subject=None, message_attributes=None, aws_conn_id='aws_default', **kwargs)[source]

Bases: airflow.models.BaseOperator

Publish a message to Amazon SNS.

See also

For more information on how to use this operator, take a look at the guide: Publish a message to an existing SNS topic

Parameters
  • aws_conn_id (str) – aws connection to use

  • target_arn (str) – either a TopicArn or an EndpointArn

  • message (str) – the default message you want to send (templated)

  • subject (Optional[str]) – the message subject you want to send (templated)

  • message_attributes (Optional[dict]) – the message attributes you want to send as a flat dict (data type will be determined automatically)

template_fields :Sequence[str] = ['target_arn', 'message', 'subject', 'message_attributes', 'aws_conn_id'][source]
template_ext :Sequence[str] = [][source]
template_fields_renderers[source]
execute(self, context)[source]

This is the main method to derive when creating an operator. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?