Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Monitor CodeBuild builds with CloudWatch alarms

Focus mode
Monitor CodeBuild builds with CloudWatch alarms - AWS CodeBuild

You can create a CloudWatch alarm for your builds. An alarm watches a single metric over a period of time that you specify and performs one or more actions based on the value of the metric relative to a specified threshold over a number of time periods. Using native CloudWatch alarm functionality, you can specify any of the actions supported by CloudWatch when a threshold is exceeded. For example, you can specify that an Amazon SNS notification is sent when more than three builds in your account fail within fifteen minutes.

To create a CloudWatch alarm for a CodeBuild metric
  1. Sign in to the AWS Management Console and open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/.

  2. In the navigation pane, choose Alarms.

  3. Choose Create Alarm.

  4. Under CloudWatch Metrics by Category, choose CodeBuild Metrics. If you know you want only project-level metrics, choose By Project. If you know you want only account-level metrics, choose Account Metrics.

  5. On Create Alarm, if it isn't already selected, choose Select Metric.

  6. Choose a metric for which you want to create an alarm. The options are By Project or Account Metrics.

  7. Choose Next or Define Alarm and then create your alarm. For more information, see Creating Amazon CloudWatch alarms in the Amazon CloudWatch User Guide. For more information about setting up Amazon SNS notifications when an alarm is triggered, see Set up Amazon SNS notifications in the Amazon SNS Developer Guide.

  8. Choose Create Alarm.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.