Skip to content

Commit 212b81b

Browse files
authored
chore: revert "docs(cloudwatch): document cross-account/cross-region alarm limitations" (#26246)
Reverts #26204 The documentation that cross-account alarms with `evaluationPeriods > 1` is incorrect, or at least too strict. I was able to create an alarm in Account B that references a metric in Account A with evaluationPeriod = 2.
1 parent 399b6bb commit 212b81b

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

packages/aws-cdk-lib/aws-cloudwatch/README.md

-7
Original file line numberDiff line numberDiff line change
@@ -274,13 +274,6 @@ The most important properties to set while creating an Alarms are:
274274

275275
To create a cross-account alarm, make sure you have enabled [cross-account functionality](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html) in CloudWatch. Then, set the `account` property in the `Metric` object either manually or via the `metric.attachTo()` method.
276276

277-
Please note that it is **not possible** to:
278-
279-
- Create a cross-Account alarm that as `evaluationPeriods > 1`. The reason is that the only
280-
way to pass an AccountID is to use the [`Metrics` field of the Alarm resource](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudwatch-alarm.html#cfn-cloudwatch-alarm-metrics). If we use the `Metrics` field, the CloudWatch event that is
281-
used to evaluate the Alarm doesn't have a `SampleCount` field anymore ("[When CloudWatch evaluates alarms, periods are aggregated into single data points](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create-alarm-on-metric-math-expression.html)"). The result is that the Alarm cannot evaluate more than 1 period.
282-
- Create a cross-Region alarm ([source](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Cross-Account-Cross-Region.html)).
283-
284277
### Alarm Actions
285278

286279
To add actions to an alarm, use the integration classes from the

0 commit comments

Comments
 (0)