-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(aws-cloudwatch) Support cross-account alarms #15959
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-cloudwatchRelated to Amazon CloudWatchRelated to Amazon CloudWatcheffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1
Description
Amazon Cloudwatch just announced cross account alarms. Account Id can be added to the alarm using the GUI in AWS account. However, cdk does not support use of region and account id when creating the alarm.
Reproduction Steps
private var metricLine = Metric.Builder.create()
.metricName("ConcurrentExecutions")
.namespace("AWS/Lambda")
.statistic("Maximum")
.region(<REGION>)
.account(<ACCOUNT_ID>)
.build()
// The alarm created here will NOT be for <REGION> and <ACCOUNT_ID>, however it will be created for the account CFN is deployed in
private var alarmWidget = Alarm.Builder.create(scope,<NAME>)
.metric(metricLine)
.alarmName(<NAME>)
.threshold(<THRESHOLD>)
.evaluationPeriods(<EVALUATION_PERIOD>)
.build()
What did you expect to happen?
Alarm should be created for the <REGION> and <ACCOUNT_ID> specified in metricLine.
What actually happened?
Alarm created was for the account the CFN was deployed to.
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-cloudwatchRelated to Amazon CloudWatchRelated to Amazon CloudWatcheffort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1