Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CloudWatch SMS notifications for EC2 instances that are not in us-east-1

I am looking to get a notification schema setup for my EC2 instances that are in the us-west-2 data center. I have read the CloudWatch and SNS docs, and I am aware that SMS notifications are only available when setting up SNS Topics in us-east-1.

I am wondering if anyone has found a way to get CloudWatch alarms for instances NOT in us-east-1 to broadcast on a topic setup in us-east-1?

like image 430
Adam Duro Avatar asked May 29 '14 17:05

Adam Duro


1 Answers

It appears that the documentation is incorrect - when trying to add a new alarm in us-west-2 that points at a topic in us-east-1 for the SMS capabilities, the following error is observed (tried this today on Sept 10 2014):

A client error (ValidationError) occurred when calling the PutMetricAlarm operation: Invalid region us-east-1 specified. Only us-west-2 is supported.

This is based on running the following command using the aws cli (account number changed to 1234567890):

aws cloudwatch put-metric-alarm --alarm-name "ELB UnHealthy > 0" --alarm-description "ELB UnHealthy > 0" --actions-enabled --ok-actions arn:aws:sns:us-west-2:1234567890:EmailOnly --alarm-actions arn:aws:sns:us-east-1:1234567890:EmailAndSMS --insufficient-data-actions arn:aws:sns:us-west-2:1234567890:EmailOnly --metric-name UnHealthyHostCount --namespace AWS/ELB --statistic Average --dimensions Name=LoadBalancerName,Value=elb-name --period 60 --evaluation-periods 3 --threshold 1 --comparison-operator GreaterThanOrEqualToThreshold

I guess the previous answer was from somebody who didn't actually test this out... It's that or AWS disabled the ability to reference other region sns topics in the last few months and forgot to update their documentation...

like image 95
keba Avatar answered Sep 30 '22 03:09

keba