AWS不支持孟买地区的短信服务.但是我需要这样做,当我尝试在发送通知设置中创建云监视报警时我复制了SNS主题的ARN,这是在弗吉尼亚但是它显示错误信息出错了,有什么方法可以做同样请分享你的想法 最佳答案 不,你不能这样做. CloudWatch将仅发布与您的cloudwatch警报/警报位于同一区域的SNS主题.
但是你可以有类似于answer的解决方法
与解决方案类似,您可以创建以下资源:
> CloudWatch Alarm (ap-south-1)
> -> SNS (ap-south-1)
> -> Lambda (you can have this in any region, cross region lambda can be invoked from sns)
> -> SNS (us-east-1), invoked from lambda
> -> SMS subscriber (us-east-1)
UPDATE
AWS确认这是不可能的https://forums.aws.amazon.com/thread.jspa?threadID=130530.
已经验证仍然无法在其他地区发布到SNS主题.我试图在ap-south-1中创建一个CW警报,以便在us-east-1中的主题中发送警报,
[ec2-user@ip-**** ~]$aws cloudwatch put-metric-alarm --alarm-name TestSMSAlarm --alarm-description "Test Alarm turned ON" --alarm-actions arn:aws:sns:us-east-1:*****:Test --metric-name HealthyHostCount --namespace AWS/ELB --statistic Maximum --dimensions "Name=LoadBalancerName,Value=awseb-e-z-AWSEBLoa-****" --period 300 --evaluation-periods 1 --threshold 1 --comparison-operator LessThanThreshold --region ap-south-1
以下错误是我得到的:
An error occurred (ValidationError) when calling the PutMetricAlarm operation: Invalid region us-east-1 specified. Only ap-south-1 is supported.
从SNS FAQ开始,以下区域现在支持SMS:
Which AWS regions support Worldwide SMS?
1) US-East-1 (Virginia), 2) US-West-2 (Oregon), 3) EU-West-1 (Dublin), 4) Asia Pacific (Tokyo), 5) Asia Pacific (Singapore), and 6) Asia Pacific (Sydney).