AWS Fundamentals Logo
AWS Fundamentals
AWS::CloudWatch::Alarm

CloudWatch Alarm

The AWS::CloudWatch::Alarm type specifies an alarm and associates it with the specified metric or metric math expression. When this operation creates an alarm, the alarm state is immediately set to INSUFFICIENT_DATA. The alarm is then evaluated and its state is set appropriately. Any actions associated with the new state are then executed. When you update an existing alarm, its state is left unchanged, but the update completely overwrites the previous configuration of the alarm.

Properties

22 configurable properties. Click a row to see details.

Filter:
PropertyTypeFlags
ActionsEnabled
boolean
AlarmActions
Array<string>
AlarmDescription
string
AlarmName
string
Create-only
ComparisonOperator
string
DatapointsToAlarm
integer
Dimensions
Array<Dimension>
EvaluateLowSampleCountPercentile
string
EvaluationPeriods
integer
ExtendedStatistic
string
InsufficientDataActions
Array<string>
MetricName
string
Metrics
Array<MetricDataQuery>
Namespace
string
OKActions
Array<string>
Period
integer
Statistic
string
Tags
Array<Tag>
Threshold
number
ThresholdMetricId
string
TreatMissingData
string
Unit
string

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
Arnstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::CloudWatch::Alarm

Resources:
  MyResource:
    Type: AWS::CloudWatch::Alarm
    Properties:
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

read

cloudwatch:DescribeAlarmscloudwatch:ListTagsForResource

create

cloudwatch:PutMetricAlarmcloudwatch:DescribeAlarmscloudwatch:TagResource

update

cloudwatch:PutMetricAlarmcloudwatch:DescribeAlarmscloudwatch:TagResourcecloudwatch:UntagResource

list

cloudwatch:DescribeAlarms

delete

cloudwatch:DeleteAlarmscloudwatch:DescribeAlarms

Get the CloudWatch Cheat Sheet

Everything you need to know about CloudWatch on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

ServiceCloudWatch
Properties23
Required0
TaggingSupported
Primary IDAlarmName

Supported Operations

ReadCreateUpdateListDelete

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

AlarmName

External Links