Publish message to SNS queue.

Module Contents



Publish a message to Amazon SNS.

class*, target_arn, message, subject=None, message_attributes=None, **kwargs)[source]


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

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

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

  • subject (str | None) – the message subject you want to send (templated)

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

  • aws_conn_id – The Airflow connection used for AWS credentials. If this is None or empty then the default boto3 behaviour is used. If running Airflow in a distributed manner and aws_conn_id is None or empty, then default boto3 configuration would be used (and must be maintained on each worker node).

  • region_name – AWS region_name. If not specified then the default boto3 behaviour is used.

  • verify – Whether or not to verify SSL certificates. See:

  • botocore_config – Configuration dictionary (key-values) for botocore client. See:

template_fields: Sequence[str][source]

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?