Using AWS CloudFormation to create tags - AMS Accelerate Operations Plan

Using AWS CloudFormation to create tags

If you don't want to use the AMS Accelerate Resource Tagger, you can apply your own tags by using AWS CloudFormation.

Important

Resource Tagger controls all tags in your account with the ams:rt: prefix, and deletes any tags with that prefix if its configuration rules don’t include the tag. Some of the AMS Accelerate service components require tags with this prefix, which means that you need to deploy both the Resource Tagger configuration and tags through AWS CloudFormation. You apply the AWS CloudFormation tags to your resources, while your Resource Tagger configuration prevents the Resource Tagger from deleting your tags.

Using AWS CloudFormation, you can apply tags at the stack level (see AWS CloudFormation documentation, Resource tag) or at the individual resource level (for example, see Tagging your Amazon EC2 resources).

The following is an example of how you can apply the tag ams:rt:ams-managed with the value true to an Amazon EC2 instance managed by AWS CloudFormation. The ams:rt:ams-managed tag opts you in to having your resources monitored by AMS Accelerate.

Type: AWS::EC2::Instance Properties: InstanceType: "t3.micro" # ...other properties... Tags: - Key: "ams:rt:ams-managed" Value: "true"

The following is an example of how you can apply the tag ams:rt:ams-managed with the value true 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. The ams:rt:ams-managed tag opts you in to having your resources monitored by AMS Accelerate.

Type: AWS::AutoScaling::AutoScalingGroup Properties: AutoScalingGroupName: "SampleASG" # ...other properties... Tags: - Key: "ams:rt:ams-managed" Value: "true"