Creating Alerts with CloudWatch Alarm

  1. Open the dashboard of CloudWatch
  2. Expand Alarms on the left side, press In alarm
  3. Press Create alarm

CreateAlarm

  1. Press Select metric

CreateAlarm

  1. Select the metric created in the previous step - BooksList_Lambda, then press env, then select staging
  • Press Select metric

CreateAlarm

  1. Select Sum for Statistic

CreateAlarm

  1. 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
  1. Click Next

CreateAlarm

  1. Select Create new topic
  2. Enter the topic name
  3. Enter the email you want to receive notifications for
  4. Click Create topic

CreateAlarm

  1. Scroll down, click Next
  2. Enter a name for the alert
  • Click Next

CreateAlarm

  1. Scroll to the bottom and press Create alarm

CreateAlarm

CreateAlarm

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

CreateAlarm

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