Creating e-mail alarms
While e-mail alarms may not be the most scalable of all alarms (due to the amount of e-mail most people get), they are the easiest to integrate—almost everyone has an e-mail address!
This recipe uses two AWS services:
- CloudWatch (CW)
- Simple Notification Service (SNS)
As you will often want to create alarms for metrics after viewing them through the CloudWatch dashboard, this recipe will use the console to create the alarms.
How to do it...
- In the CloudWatch console, go to the
Alarms
section:
- Click
Create Alarm
to start the wizard:
- Select the metric you are interested in alerting on. In this case, we will choose
By Function Name
underLambda Metrics
:
- Select the specific metric. You can filter by any of the values in the table. In this case, we will select
Errors
and clickNext
:
- Define the alarm, giving at least a name and a threshold. In this case, we will alert if there are ever any errors (such as
> 0
):
- In the
Actions
section, create a new list by giving the e-mail address...