SNS Topics

Introduction to AWS Boto in Python

Maksim Pecherskiy

Data Engineer!

SNS

SNS

Introduction to AWS Boto in Python

Understanding SNS

SNS

Introduction to AWS Boto in Python

Understanding SNS

SNS

Introduction to AWS Boto in Python

Understanding SNS

SNS

Introduction to AWS Boto in Python

Understanding SNS

SNS

Introduction to AWS Boto in Python

Understanding SNS

SNS

Introduction to AWS Boto in Python

Understanding SNS

SNS

Introduction to AWS Boto in Python

Accessing SNS

SNS

Introduction to AWS Boto in Python

SNS Dashboard

SNS Dashboard

Introduction to AWS Boto in Python

SNS Topics

SNS Topics

Introduction to AWS Boto in Python

SNS Topics

SNS Topics

Introduction to AWS Boto in Python

Creating an SNS Topic

sns = boto3.client('sns', 
                   region_name='us-east-1', 
                   aws_access_key_id=AWS_KEY_ID,                   
                   aws_secret_access_key=AWS_SECRET)
Introduction to AWS Boto in Python

Creating an SNS Topic

response = sns.create_topic(Name='city_alerts')
Introduction to AWS Boto in Python

Creating an SNS Topic

Creating an SNS topic

Introduction to AWS Boto in Python

Creating an SNS Topic

topic_arn = response['TopicArn']

Or... a shortcut

sns.create_topic(Name='city_alerts')['TopicArn']
Introduction to AWS Boto in Python

Creating an SNS Topic

Creating an SNS topic

Introduction to AWS Boto in Python

Permissions

Permissions

Introduction to AWS Boto in Python

Listing topics

response = sns.list_topics()
Introduction to AWS Boto in Python

Listing topics

Listing topics

Introduction to AWS Boto in Python

Deleting topics

sns.delete_topic(TopicArn='arn:aws:sns:us-east-1:320333787981:city_alerts')
Introduction to AWS Boto in Python

Review

SNS overview

Introduction to AWS Boto in Python

Review

Create SNS Client

sns = boto3.client('sns', 
                   region_name='us-east-1', 
                   aws_access_key_id=AWS_KEY_ID,                   
                   aws_secret_access_key=AWS_SECRET)

Create a topic

response = sns.create_topic(Name='city_alerts')
topic_arn = response['TopicArn']
Introduction to AWS Boto in Python

Review

List Topics

response = sns.list_topics()
topics = response['Topics']

Delete a topic

sns.delete_topic(TopicArn='arn:aws:sns:us-east-1:320333787981:city_alerts')
Introduction to AWS Boto in Python

Let's practice!

Introduction to AWS Boto in Python

Preparing Video For Download...