airflow.contrib.hooks.aws_sns_hook

This module contains AWS SNS hook

Module Contents

class airflow.contrib.hooks.aws_sns_hook.AwsSnsHook(*args, **kwargs)[source]

Bases: airflow.contrib.hooks.aws_hook.AwsHook

Interact with Amazon Simple Notification Service.

get_conn(self)[source]

Get an SNS connection

publish_to_target(self, target_arn, message, subject=None)[source]

Publish a message to a topic or an endpoint.

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

  • message – the default message you want to send

  • message – str

  • subject (str) – subject of message

Was this entry helpful?