Providing tags using AWS CloudFormation - AMS Accelerate Operations Plan

Providing tags using AWS CloudFormation

To apply tags using AWS CloudFormation, you can apply tags at the stack level (see CloudFormation Resource Tags) or, at the individual resource level, (for example, see Creating EC2 Instance Tags).

The following is an example of how you can apply AMS Accelerate alarm management tags to an Amazon EC2 instance managed by AWS CloudFormation:

Type: AWS::EC2::Instance Properties: InstanceType: "t3.micro" # ...other properties... Tags: - Key: "ams-monitoring-policy" Value: "ams-monitored" - Key: "ams-monitoring-policy-platform" Value: "ams-monitored-linux"

The following is an example of how you can apply AMS Accelerate alarm management tags to an Auto Scaling group managed by AWS CloudFormation. Note that the Auto Scaling group will propagate its tags to Amazon EC2 instances that are created by it:

Type: AWS::AutoScaling::AutoScalingGroup Properties: AutoScalingGroupName: "TestASG" # ...other properties... Tags: - Key: "ams-monitoring-policy" Value: "ams-monitored" - Key: "ams-monitoring-policy-platform" Value: "ams-monitored-linux"