CloudWatch allows you to create alerts-based on the available metrics when unexpected behavior occurs. In the following example, we will create an alarm based on the error rate of the FindAllMovies function:
In order to achieve that, click on the ring bell icon from the Actions column. Then, fill in the following fields to set up an alarm that will be triggered if the number of errors is more than 10 within five minutes. Once the alarm is triggered, an email will be sent using Simple Notification Service (SNS):