Creating Alerts with CloudWatch Alarm
- Open the dashboard of CloudWatch
- Expand Alarms on the left side, press In alarm
- Press Create alarm

- Press Select metric

- Select the metric created in the previous step - BooksList_Lambda, then press env, then select staging

- Select Sum for Statistic

- Set the condition in the item condition
- Select Static for Threshold type
- Select Greater/Equal as the warning condition
- Enter 2 as the value of the alarm threshold
- Click Next

- Select Create new topic
- Enter the topic name
- Enter the email you want to receive notifications for
- Click Create topic

- Scroll down, click Next
- Enter a name for the alert

- Scroll to the bottom and press Create alarm


- Back to Postman’s screen, press Send twice to call the API twice
- Open email and check

- Back to the CloudWatch dashboard
- Click All alarms, then select the alarm you just created
- The histogram of the metric is displayed