user3597719
user3597719

Reputation: 577

Add SNS topic to existing CloudWatch Alarm with Cloudformation AWS

I have a separate cloudformation template which creates cloud watch alarms for resources.

I am creating another cloudformation template for some specific purposes. The sub task involves to add SNS topic to existing cloudwatch alarm created by separate template.

Is it possible with cloudformation template?

P.S. I know we can edit cloudwatch alarm manually through AWS console OR we can use PutAlarm action to add topic. However I really want to achieve this with cloudformation template without any explicit actions.

Upvotes: 0

Views: 1197

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269320

You can send information between templates by using Import/Export.

So, your first template can export the ARN of the Alarm and the second template can import this value and reference it.

See: Exporting Stack Output Values - AWS CloudFormation

However, I doubt you can add another Notification type to an existing alarm, since this is part of the Alarm definition itself.

Upvotes: 0

Related Questions