Skip to content

Instantly share code, notes, and snippets.

@anna-geller
Created June 29, 2021 16:06
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/52a51d2e597d35d76f14429ef2cee6bb to your computer and use it in GitHub Desktop.
Save anna-geller/52a51d2e597d35d76f14429ef2cee6bb 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")
# CREATE SUBSCRIPTIONS
email_sub = sns.subscribe(
TopicArn=topic_arn, Protocol="email", Endpoint="youremail@yourdomain.com"
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment