}
Viewing the number of resources managed by Resource Tagger
Resource Tagger sends metrics every hour to Amazon CloudWatch, in the AMS/ResourceTagger namespace. Metrics are emitted only for resource types supported by Resource Tagger.
Metric Name Dimensions Description
ResourceCount Component, ResourceType Number of resources (of the specified resource type) deployed in this region.
Units: Count
ResourcesMissingManagedTagsComponent, ResourceType Number of resources (of the specified resource type) that require managed tags, according to the configuration profiles, but have not yet been tagged by Resource Tagger.
Units: Count
UnmanagedResourcesComponent, ResourceType Number of resources (of the specified resource type) with no managed tags applied by Resource Tagger. Typically, these resources did not match any Resource Tagger configuration block, or are explicitly excluded from configuration blocks.
Metric Name Dimensions Description Units: Count MatchingResourceCountComponent, ResourceType,
ConfigClauseName Number of resources (of the specified resource type) that match the Resource Tagger configuration block. For a resource to match the configuration block, the block must be enabled and the resource must match the block's filter.
Units: Count
These metrics are also viewable as graphs, in the AMS-Resource-Tagger-Reporting-Dashboard. To see the dashboard, from the AWS CloudWatch management console, select AMS-Resource-Tagger-Reporting-Dashboard. By default, the graphs in this dashboard display the data for the prior 12-hour period.
AMS Accelerate deploys CloudWatch alarms to your account to detect significant increases in the number of unmanaged resources, for example, resources excluded from management by AMS Resource Tagger.
AMS Operations will investigate increases in unmanaged resources that exceed: either 3 resources of the same type, or a 50% increase over all resources of the same type. If the change does not appear to be deliberate, AMS Operations may contact you to review the change.
CloudFormation
You can use AWS CloudFormation to 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).
Important
Some AMS Accelerate service components require tags with the ams:rt: prefix. Resource Tagger believes that it owns these tags, and will delete them if no Resource Tagger configuration rules permit them. You always need to deploy a Resource Tagger configuration profile for these tags, even if you are using AWS CloudFormation or Terraform.
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
Terraform Properties:
AutoScalingGroupName: "SampleASG"
# ...other properties...
Tags:
- Key: "ams:rt:ams-managed"
Value: "true"
Terraform
If you don't want to use AMS Accelerate Resource Tagger, you can apply your own tags using Terraform.
However, if you don't want to use Resource Tagger because of its drift from your Terraform definitions, there is a way for you to use the Resource Tagger and ignore the drift it causes; see Configuring Terraform to ignore Resource Tagger tags (p. 71).
Important
Some AMS Accelerate service components require tags with the ams:rt: prefix. Resource Tagger believes that it owns these tags, and will delete them if no Resource Tagger configuration rules permit them. You always need to deploy a Resource Tagger configuration profile for these tags, even if you are using AWS CloudFormation or Terraform.
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 Terraform. The ams:rt:ams-managed tag opts you in to having your resources monitored by AMS Accelerate.
resource "aws_instance" "sample_linux_instance" { # ...ami and other properties...
instance_type = "t3.micro"
tags = {
"ams:rt:ams-managed" = "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 Terraform. Note that the Auto Scaling group propagates its tags to the 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.
resource "aws_autoscaling_group" "sample_asg" { # ...other properties...
name = "terraform-sample"
tags = {
"ams:rt:ams-managed" = "true"
} }
For a description of how to manage Terraform-created resource tags, see Configuring Terraform to ignore Resource Tagger tags (p. 71).