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

Exercise

Sending multi-level alerts

Sam is going to prototype her alerting system with the water data and the water department.

According to the Director, when there are over 100 alerts outstanding, that's considered critical. If there are over 300, that's extreme.

She has done some calculations and came up with a vcounts dictionary, that contains current requests for 'water', 'streets' and 'trash'.

She has also already created the boto3 SNS client and stored it in the sns variable.

In this exercise, you will help Sam publish a critical and an extreme alert based on the thresholds!

Instructions

100 XP
  • If there are over 100 water violations, publish to 'water_critical' topic.
  • If there are over 300 water violations, publish to 'water_extreme' topic.