Skip to content

Instantly share code, notes, and snippets.

@anna-geller
Created June 27, 2021 15:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anna-geller/b20562f5a7e8a23a6952d4a98bb1700d to your computer and use it in GitHub Desktop.
Save anna-geller/b20562f5a7e8a23a6952d4a98bb1700d to your computer and use it in GitHub Desktop.
import boto3
sns = boto3.client("sns", region_name="eu-central-1")
# CREATE TOPIC
topic_name = "ge_timeseries_data_test"
create_response = sns.create_topic(Name=topic_name)
topic_arn = create_response.get("TopicArn")
print("Create topic response: %s", create_response)
# CREATE SUBSCRIPTIONS
email_sub = sns.subscribe(
TopicArn=topic_arn, Protocol="email", Endpoint="youremail@gmail.com"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment