1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to AWS Boto in Python

Exercise

Deleting multiple subscriptions

Now that Sam has a maturing notification system, she is learning that the types of alerts she sends do not bode well for text messaging.

SMS alerts are great if the user can react that minute, but "We are 500 potholes behind" is not something that a Council Member can jump up and fix.

She decides to remove all SMS subscribers from the streets_critical topic, but keep all email subscriptions.

She created the boto3 SNS client in the sns variable, and the streets_critical topic ARN is in the str_critical_arn variable.

In this exercise, you will help Sam remove all SMS subscribers and make this an email only alerting system.

Instructions

100 XP
  • List subscriptions for 'streets_critical' topic.
  • For each subscription, if the protocol is 'sms', unsubscribe.
  • List subscriptions for 'streets_critical' topic in one line.
  • Print the subscriptions