Export existing AWS CloudWatch alarms to CloudFormation template

Viewed 2252

How to export existing, configured and tested AWS CloudWatch alarms to Cloudformation template?

I know about CloudFormer tool, but it supports limited number of AWS services (Amazon VPC, DynamoDB, etc) and don't supports some of services which we use. Which tools and approaches can I use in my case for generating Cloudformation template?

2 Answers

You can do it for already existed alarm by the following steps:

  1. Go to the alarm definition in AWS console
  2. From Action (top right) menu select "View Source"
  3. In the bottom of popup dialog with alarm's sources select "CloudFormation YAML" or "CloudFormation JSON"

AWS have recently announced the ability to create a new CloudFormation stack using existing resources or update an existing CloudFormation stack with imported resources. The announcement came via the AWS blog.

The CloudFormation documentation has been updated and includes supported resources (CloudWatch Alarms, VPC and DynamoDB Tables are all supported).

Related