Skip to main content

AWS Tags: What makes using them so important

Using AWS tags to control deployment sprawl

Adding AWS tags to your Amazon assets and resources is a simple, but potentially critical part of infrastructure management. Tags, when used intelligently, help IT teams streamline the way they manage deployment environments.

Possible structural profiles that can benefit from AWS tags

  • Environment-based tags can be used by customers with larger AWS footprints. These tags will help you quickly distinguish between resources that are part of your production, development, or staging infrastructure.
  • Application-based tags can be used to describe the set of disparate resources (or clusters) that work together to deliver a particular product or service. Such tags can also make sense for resource identification in smaller environments.
  • Role-based tags are used to describe either the function or owner of a particular node (web server, database server, load balancer, etc). Such tags are appropriate for smaller deployments.

How AWS tags help

Here’s one obvious scenario. Imagine an operation providing multiple separate applications served through dozens or hundreds of EC2 instances along with the accompanying environment infrastructure.

Just keeping track of your ongoing billing costs can be a headache. Ask yourself these questions: Which AWS resources (instances, volumes, snapshots…) are actually in use and which are currently lying idle or detached? Which Tiers or environments are incurring the highest costs? Should this be changed? Which business unit is exceeding their AWS cost allocations?

Tags can help. Being able to visually or programmatically identify resources by descriptive tags can make it much easier to understand both their purpose and provenance. If you know what a resource is supposed to be doing, then you’re in a much better position to quickly assess and, if necessary, adjust its costs. Tagging is a simple but essential feature that helps us reduce and control costs by improving the way we understand what’s really going on.

AWS Tags: in detail

Each AWS tag consists of a key and a value, both of which can be defined by the user. Not every AWS service permits customer-defined tags for every service, and some that do, can only be tagged only using API Command Line access. The following Screen Shot shows the current tag-status of AWS resources. Resources with tagging restrictions of “None” can be tagged with API actions, the CLI, and the console.

AWS tags by service

The following diagram illustrates how tagging works:

AWS tags: EC2

In this example, I am assigning two tags to each of my EC2 instances, one called Owner and another called Stack. Each of the tags also has an associated value.

Owner = Nitheesh, Stack = Production

You can define AWS tags from the EC2 console by selecting the relevant instance and selecting the “Tags” option.  Alternatively, you can select the instance, click “Actions” and select “Add/Edit Tags.”

AWS Tagging limitations and cost leakage

Currently, AWS Tags have important limitations. For example, a tag associated with a single AWS resource will apply only to that resource and is not automatically propagated to dependent attached resources.

For example, imagine an EC2 instance whose dependent resources include devices like EBS volumes, Security Groups, and Snapshots. A simple RAID configuration could involve as many as eight EBS Volumes and an unmanageable number of snapshots. But none of these dependent devices will automatically inherit their parent’s tags.

Now imagine how this might look if you’re running thousands of EC2 instances. You’ll have to find each EBS volume associated with a particular instance and individually tag it. Managing this is easier said than done, and the slightest typing error can lead to significant cost leakage.

What if there was a tool to automate tagging for dependent AWS resources? It will surely reduce a great deal of manual labor, and help us identify and, if necessary, remove all dependent resources along with a newly redundant EC2 instance. This would avoid leakages and reduce the cost of cloud operations in very dynamic AWS environments.

Welcome to Graffiti Monkey

There is just such a tool. Graffiti Monkey goes around tagging things automatically. By looking at the tags of an EC2 instance, it copies those tags to all attached EBS Volumes and copies those tags to the EBS Snapshots as well. This small automation reduces hours of manual labor on large AWS deployments, helping us efficiently manage our cloud infrastructure and reduce the cost leakages.

Step 1: Installing Graffiti Monkey 

Easiest way to install Graffiti Monkey is through the usual PyPI channels.
sudo pip install graffiti_monkey
AWS tags: Installing Graffiti Monkey

Step 2: Using Graffiti Monkey

graffiti-monkey --region ap-southeast-2 --verbose

AWS tags: Applying Graffiti Monkey
This will will identify the tags associated with your existing EC2 instance, and apply them to dependent resources like EBS volumes and snapshots, saving hours of manual labor.

Written by

Nitheesh Poojary

My professional IT career began nine years back when I was just out of my college. I worked with a great team as an infrastructure management engineer, managing hundreds of enterprise application servers. I found my passion when I got the opportunity to work with Cloud technologies: I'm addicted to AWS Cloud Services, DevOps engineering, and all the cloud tools and technologies that make engineers' lives easier. Currently, I am working as a Solution Architect in SixNines IT. We are an experienced team of engineers that have helped hundreds of customers move to the cloud responsibly. I have achieved 5 AWS certifications, happily helping fellow engineers across the globe through my blogs and answering questions in various forums.

Related Posts

— February 11, 2019

WaitCondition Controls the Pace of AWS CloudFormation Templates

AWS's WaitCondition can be used with CloudFormation templates to ensure required resources are running.As you may already be aware, AWS CloudFormation is used for infrastructure automation by allowing you to write JSON templates to automatically install, configure, and bootstrap your ...

Read more
  • AWS
— January 24, 2019

The 9 AWS Certifications: Which is Right for You and Your Team?

As companies increasingly shift workloads to the public cloud, cloud computing has moved from a nice-to-have to a core competency in the enterprise. This shift requires a new set of skills to design, deploy, and manage applications in the cloud.As the market leader and most mature p...

Read more
  • AWS
  • AWS certifications
— November 28, 2018

Two New EC2 Instance Types Announced at AWS re:Invent 2018 – Monday Night Live

The announcements at re:Invent just keep on coming! Let’s look at what benefits these two new EC2 instance types offer and how these two new instances could be of benefit to you. If you're not too familiar with Amazon EC2, you might want to familiarize yourself by creating your first Am...

Read more
  • AWS
  • EC2
  • re:Invent 2018
— November 21, 2018

Google Cloud Certification: Preparation and Prerequisites

Google Cloud Platform (GCP) has evolved from being a niche player to a serious competitor to Amazon Web Services and Microsoft Azure. In 2018, research firm Gartner placed Google in the Leaders quadrant in its Magic Quadrant for Cloud Infrastructure as a Service for the first time. In t...

Read more
  • AWS
  • Azure
  • Google Cloud
Khash Nakhostin
— November 13, 2018

Understanding AWS VPC Egress Filtering Methods

In order to understand AWS VPC egress filtering methods, you first need to understand that security on AWS is governed by a shared responsibility model where both vendor and subscriber have various operational responsibilities. AWS assumes responsibility for the underlying infrastructur...

Read more
  • Aviatrix
  • AWS
  • VPC
— November 10, 2018

S3 FTP: Build a Reliable and Inexpensive FTP Server Using Amazon’s S3

Is it possible to create an S3 FTP file backup/transfer solution, minimizing associated file storage and capacity planning administration headache?FTP (File Transfer Protocol) is a fast and convenient way to transfer large files over the Internet. You might, at some point, have conf...

Read more
  • Amazon S3
  • AWS
— October 18, 2018

Microservices Architecture: Advantages and Drawbacks

Microservices are a way of breaking large software projects into loosely coupled modules, which communicate with each other through simple Application Programming Interfaces (APIs).Microservices have become increasingly popular over the past few years. The modular architectural style,...

Read more
  • AWS
  • Microservices
— October 2, 2018

What Are Best Practices for Tagging AWS Resources?

There are many use cases for tags, but what are the best practices for tagging AWS resources? In order for your organization to effectively manage resources (and your monthly AWS bill), you need to implement and adopt a thoughtful tagging strategy that makes sense for your business. The...

Read more
  • AWS
  • cost optimization
— September 26, 2018

How to Optimize Amazon S3 Performance

Amazon S3 is the most common storage options for many organizations, being object storage it is used for a wide variety of data types, from the smallest objects to huge datasets. All in all, Amazon S3 is a great service to store a wide scope of data types in a highly available and resil...

Read more
  • Amazon S3
  • AWS
— September 18, 2018

How to Optimize Cloud Costs with Spot Instances: New on Cloud Academy

One of the main promises of cloud computing is access to nearly endless capacity. However, it doesn’t come cheap. With the introduction of Spot Instances for Amazon Web Services’ Elastic Compute Cloud (AWS EC2) in 2009, spot instances have been a way for major cloud providers to sell sp...

Read more
  • AWS
  • Azure
  • Google Cloud
  • SpotInst
— August 23, 2018

What are the Benefits of Machine Learning in the Cloud?

A Comparison of Machine Learning Services on AWS, Azure, and Google CloudArtificial intelligence and machine learning are steadily making their way into enterprise applications in areas such as customer support, fraud detection, and business intelligence. There is every reason to beli...

Read more
  • AWS
  • Azure
  • Google Cloud
  • Machine Learning
— August 17, 2018

How to Use AWS CLI

The AWS Command Line Interface (CLI) is for managing your AWS services from a terminal session on your own client, allowing you to control and configure multiple AWS services.So you’ve been using AWS for awhile and finally feel comfortable clicking your way through all the services....

Read more
  • AWS