CloudWatchAlarm
When you create a condition, you can add the CloudWatchAlarm
rule. This
section provides a reference for the rule parameters. For more information about rules and
conditions, see How do stage conditions work?.
You must have already created an alarm in Amazon CloudWatch as a separate resource.
Important
In cases where the DeploymentWindow
rule and the
CloudWatchAlarm
rule are contained together in an entry condition, it
is possible that the CloudWatchAlarm
alarm might succeed before the
deployment window for the DeploymentWindow
rule opens. After the deployment
window opens, CodePipeline does not check the CloudWatchAlarm
alarm again. This
can result in an alarm state when the pipeline execution enters the stage.
Rule type
-
Category:
Rule
-
Owner:
AWS
-
Provider:
CloudWatchAlarm
-
Version:
1
Configuration parameters
- AlarmStates
-
Required: Yes
The desired CloudWatch alarm states for the rule to monitor. Valid values are ALARM, OK, and INSUFFICIENT_DATA.
- AlarmName
-
Required: Yes
The name of the CloudWatch alarm. This is a separate resource created in CloudWatch.
- WaitTime
-
Required: No
The wait time in minutes to allow for a state change before running the rule result. For example, configure 20 minutes to wait for an ALARM state to change to OK before applying the rule result. For the Entry condition, this is the amount of time CodePipeline will wait if the alarm is in ALARM state when it is first evaluated. If the alarm is in OK state when the rule is first checked, the rule will immediately succeed.
Example rule configuration
See also
The following related resources can help you as you work with this rule.
-
Creating On Failure conditions – This section provides steps for creating an On Failure condition with an alarm rule.