Create an Alert System

In this step, we will create an alert system using CloudWatch Alarm, a service that helps us detect and notify when metrics exceed thresholds.

  1. Go to the CloudWatch Console
  • Under the Alarms section, click on In alarm
  • Then click Create alarm

alarm

  1. In Step 1, click Select metric

alarm

  1. In the Select metric interface:
  • Choose Browse
  • Click on the previously created service
  • Then click Select metric

alarm

  1. After selection, your chosen metric will appear along with related details

alarm

  1. Configure the metric settings as shown:

alarm

  1. Scroll down a bit:
  • For Threshold type, select Static
  • Under Whenever ProcessingTime is…, choose Greater
  • Set the value to 350
  • For Datapoints to alarm, set both min and max to 3

alarm

  1. Scroll to the bottom and click Next

alarm

  1. In Step 2 interface:
  • Under Alarm state trigger, select In alarm
  • Under Send a notification to the following SNS topic, choose Create new topic
  • Name the new topic
  • Enter your email under Email endpoints that will receive the notification (make sure to confirm when AWS sends the verification email)
  • Click Create topic

alarm

  1. Scroll down and click Next

alarm

  1. In Step 3:
  • Set Alarm name to HighProcessingLatency
  • In Description, enter: Alert when Lambda ProcessingTime > 350ms avg in 1 min
  • Click Next

alarm

  1. The Overview screen will appear. Review your settings and click Create alarm

alarm

  1. You will be redirected to the Alarms Management screen — click on the alarm you just created

alarm

  1. Review the alarm details and important configuration metrics

alarm

  1. Use Postman to send a high volume of test requests

alarm

  1. Go back to the Alarms page and check the alarm status and metrics

alarm

  1. Wait for an alert email from AWS

alarm

And that’s it — we’ve successfully created an alert system. In the next section, we’ll explore cost analysis and system optimization.