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

Connected

Exercise

Different protocols per topic level

Now that Sam has created the critical and extreme topics, she needs to subscribe the staff from her contact list into these topics.

Sam decided that the people subscribed to 'critical' topics will only receive emails. On the other hand, people subscribed to 'extreme' topics will receive SMS - because those are pretty urgent.

She has already created the boto3 SNS client in the sns variable.

Help Sam subscribe the users in the contacts DataFrame to email or SMS notifications based on their department. This will help get the right alerts to the right people, making the City of San Diego run better and faster!

Instructions

100 XP
  • Get the topic name by using the 'Department' field in the contacts DataFrame.
  • Use the topic name to create the critical and extreme TopicArns for a user's department.
  • Subscribe the user's email address to the critical topic.
  • Subscribe the user's phone number to the extreme topic.