Search⌘ K
AI Features

Adding Deployment Alerts

Explore how to add deployment alerts for AWS Lambda functions using CloudWatch metrics and alarms. Understand how to automate error detection during deployments and configure alarms to notify and roll back faulty releases. Learn to enhance deployment safety with custom metrics and Lambda hooks for pre- and post-deployment actions.

We'll cover the following...

CloudWatch #

So far, you haven’t set up any tests o compare the old and new versions. You could manually try things out during the deployment and then roll back in case of problems from the CodeDeploy Web Console, but that’s not really efficient or sustainable. It would be better if CodeDeploy did this automatically.

Luckily, CloudWatch can look out for errors automatically. You used CloudWatch to access logs in the previous chapter, but you can also use it to inspect and monitor operational statistics about your application. CloudWatch automatically tracks lots of interesting information about AWS Lambda and API Gateway, such as latency, number of invocations, and number of errors. Here is how you can see this information:

  1. Go to the AWS Web Console, https://aws.amazon.com, and sign in if necessary.
  2. Select CloudWatch in the list of services.
  3. Select Metrics in the left-hand menu.
  4. In the list of metric namespaces, select Lambda then By Function name, and select check boxes next to
...