DEV Community

Cover image for Tagger- AWS tagging tool
Tobias Haindl
Tobias Haindl

Posted on

Tagger- AWS tagging tool

Sick and tired of managing your AWS resource tags manually?
Is your tagging schema too comprehensive to remember each time launching a new EC2 instance?

If you nodded your head during reading the questions above, taggercli might be the right tool for you.

Taggercli

Let me explain the two main use-cases of taggercli.

Let's imagine you work for a company called MyFantasyCorp.
MyFantasyCorp has multiple AWS accounts linked via an AWS organization.
AWS account A is for all Marketing related projects.
MyFantasyCorp has introduced a new tagging schema. Every AWS resource should be tagged according to the schema.
The tagging schema for account A might look like the following:
'Department': 'Marketing', 'Owner': 'Bob', 'Project':'CRM'

Unfortunately there are already multiple AWS resources in different regions in account A.
Some have those tags applied, some are completely untagged.
You as an engineer want to apply all tags in the proposed tagging schema.
How does taggercli help with accomplishing this task ?

1. Visualize the current tagging status

When running tagger report create --region AWS_REGION a html report is created including all supported resources in the specified region (if no region is specified, default region from config is used).
A list of all the supported resource types can be found here.

Each found resource is displayed with multiple tag diffs, comparing the current version with the specified tags from the configuration file.
The image below shows an example:

Sample report

As you can see in the example there are four types of tag diffs:

  • NEW: the tag key and the value is currently not attached to the resource (green key and value)
  • NEW_VALUE: the tag key is already on the resource but with a different value (green value)
  • EXISTING: the tag key and value are already on the resource (shown in black)
  • EXISTING_NOT_IN_SCHEMA: tags which are not specified in the config file but already attached to the resource (shown in gray)

2. Applying tags to resources

The report command gives you an idea of how the resources would look after the tagging operation is performed.
You can apply the configured tags by running tagger tag all --region AWS_REGION.
Internal it scans the specified region and global resources (like IAM roles, users). After the scanning is done you can take a look at the found resources. In the final step you are asked to confirm the tagging operation.

Tagging command in action:

Congratulations, you tagged multiple resources with a single command!


We hope this little tool helps you to stay organized within AWS.

Thanks for reading!


GitHub logo IT-EXPERTS-AT / tagger

Tagger provides an easy way to manage AWS tags

Tagger

build codecov
build codecov
build codecov

About

This project contains taggercore, taggercli and taggerlambda

Taggercli helps with two main use cases:

  • finding resources in your AWS account and compare it to a certain tagging schema
  • applying a tagging schema to resources

Taggerlambda automates your tagging process by scanning your AWS account periodically and applying tags.

Taggercore provides utility classes for scanning an AWS account and tagging resources.

Please take a look at the individual README files for further information.

Contribution

Please feel free to contribute to this project. Any help would be gladly appreciated.




Latest comments (0)