0
votes

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.

1

1 Answers

0
votes

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.