One hallmark of the current digital age is sprawl. From system resources to personal documents, it is astonishing how quickly files accumulate on personal devices. A brand new Windows or Mac OS laptop will contain hundreds of thousands of files before you save one text document or receive a single email. Once you do start using your device, the files start to accumulate quickly. From work documents to family photos, downloaded PDFs, and temporary files, the sheer volume can be overwhelming.
Over time, this digital clutter becomes difficult to navigate, creating frustration as you attempt to locate specific documents among the chaos. Or else you may face the flip side of that problem, when you come across a file and don’t know what it contains or why you have it. For example, my Downloads directory contains over 3,000 files and one of them named D7FCD3DB8FA4D57210F80E3DD9C340DC.pdf.
Even if the file had a more descriptive and meaningful name, I may still not remember why I downloaded it in 2020, whether I need it today, and where to store it for the future. The same problem applies to all the photos and videos that I have taken over the years. I have over 20,000 images in my Photos app and no hope of ever cleaning out unwanted ones or organizing them beyond the limited time and location categorization built into the app.
Knowing where to store files is another challenge. Traditional folder-based organization systems, while effective to an extent, can fall short when a file or image can contain multiple aspects. Is this receipt a general expense or a proof of warranty. Is that a photo of my kids or of their friends, or of a school event?
Tags to the Rescue
This is where tags come into play as a powerful tool for managing and categorizing files. Tags offer a flexible and intuitive way to organize information. Unlike folders, which confine files to a single location, tags can assign multiple labels to a single file, enabling cross-referencing and multi-dimensional categorization. For example, adding labels of “Receipt” and “Warranty Proof” to a file makes it easy to find either type of file quickly when needed, no matter where they are stored in the directory structure. This approach mirrors the way our brains naturally categorize information—not in rigid hierarchies, but through interconnected associations.
Most modern operating systems and software now support tagging, providing users with an enhanced ability to search and filter their files. MacOS, for instance, allows users to tag files with colored labels and keywords, while Windows provides a similar feature through file properties. Even note-taking apps like Evernote and cloud storage platforms such as Google Drive and Dropbox have embraced tagging, enabling seamless organization and retrieval of information. By integrating tags into their workflows, individuals can reduce clutter, improve productivity, and maintain a sense of order in their digital lives.
The Cloud Forest
The challenges of managing digital resources are not confined to personal devices. In the world of cloud computing, such as AWS, the accumulation of resources such as virtual servers, storage buckets, databases, and more can also grow rapidly. Just as files pile up on a personal computer, cloud resources can become disorganized, leading to inefficiencies, increased costs, and even security risks. The solution? There again, tags!
In AWS, tagging serves as a critical method for organizing and managing cloud resources. Tags in AWS consist of key-value pairs that users can assign to resources. For example, a tag might have a key like “Environment” and a value such as “Production” or “Development.” Another common tag might be “Project” with values like “E-commerce Platform” or “Analytics Dashboard.” These tags help administrators and teams quickly identify and categorize resources, providing clarity in a complex and dynamic environment.
The benefits of using tags in AWS extend beyond mere organization. They play a vital role in cost management by enabling users to allocate expenses accurately. With proper tagging, organizations can generate detailed cost reports, ensuring that resources are charged to the correct department, project, or team. For example, tagging resources with keys like “Department:Finance” or “Project:MobileApp” makes it easy to analyze spending and identify areas where optimizations can be made.
Additionally, tags improve governance and security in AWS. Administrators can use tags to enforce policies, monitor compliance, and track resource usage. For instance, tagging resources with “Owner:JohnDoe” clarifies accountability, while tags like “Backup:Yes” ensure critical data is protected. AWS also offers services such as AWS Resource Groups and AWS Config that leverage tags for streamlined management, enabling users to group related resources and monitor their configurations effectively.
Automate the Tags
Integrating tags into a cloud management strategy requires careful planning and implementation. Unlike personal devices, where tags are often applied ad hoc, AWS tagging strategies should be standardized and enforced across teams to maximize their utility. This involves defining a consistent naming convention for tags and educating team members on their importance and usage. For example, a standard policy might require every resource to have tags for “Environment,” “Project,” “Owner,” and “CostCenter.”
Automation can further enhance the effectiveness of tags in AWS. By using infrastructure as code tool, such as Terraform or CloudFormation, tags can be applied without exceptions and at scale, ensuring compliance with organizational policies. In Terraform configurations, adding default tags to the provider block will ensure that they are applied to every resource that can be tagged.
provider "aws" {
region = var.aws_region
default_tags {
tags = {
business_unit = "Digital Products"
map_migrated = "210dagyouit89"
}
}
}
Code language: JavaScript (javascript)
Essential Tags
Many large and even startup organizations use tags, but they quickly become obsolete or lose their meaning. Tags for the purpose of cost governance and compliance, such as business unit, department, and data_categorizaiton have their purpose, but for many product development and operations teams, other tags are more important. Common tags created for these groups include application_name, owner and created_by. However, these also don’t tell the full story. What if a database is used by multiple applications? As people move within the organization or out altogether, the owner and created_by tags lose their value. Experience shows that the following tags can be more useful and the values can be created automatically.
scm_repo: Some organizations use a single repository for all their infrastructure code, but it is increasingly standard practice to use multiple repos that are owned and managed by different teams. Therefore, knowing where the code for any infrastructure item becomes important for troubleshooting, maintenance and change.
scm_branch: Similar to scm_repo, if a repo contains multiple branches, it becomes important to know which branch was used to build the infrastructure. This is less of an issue in production environments than nonprod, but if an organization uses hotfixes to deploy to prod, this is vital knowledge. Usually, the IAC repository for a resource will not change, and may be hard-coded. However, the branch can be dynamic, and if possible, it should be set dynamically. In Terraform, one possible approach is to fetch the value as shown below:
data "external" "git_branch" {
program = ["bash", "-c", "git branch --show-current | jq -n -R '{branch: input}'"]
}
locals {
git_branch = data.external.git_branch.result["branch"]
}
provider "aws" {
region = var.aws_region
default_tags {
tags = {
scm_branch = local.git_branch
}
)
}
}
Code language: JavaScript (javascript)
creation_date: Knowing when a resource was created or last updated can be useful in many cases, such as troubleshooting issues or investigating security threats.
expiration_date: One of most important pieces of knowledge is knowing how long a resource is needed. It is common for a server to be created for some proof of concept, and then never get deleted. This occurs most frequently in non-prod environments. Over time, these can add unnecessary cost and yet go unnoticed within the forest of other resources in a large organization’s inventory. Resources that do not add cost, such as security groups or S3 buckets, are especially prone to proliferation, adding security risk and undesirable mental load. Setting an expiration date can help with cleaning up resources that are no longer necessary. A default value can be set with automation using the provider block and overridden as needed.
locals {
creation_date = timestamp()
expiration_date = timeadd(local.creation_date, "24h")
}
provider "aws" {
region = var.aws_region
default_tags {
tags = {
creation_date = local.creation_date
expiration_date = local.expiration_date
}
)
}
}
Code language: JavaScript (javascript)
purpose: Over time, people and teams may forget why a resource was created or how it is used. Adding a tag like purpose can help. Often, the value of a tag is limited to a word or two. This seems to be a practice born out of convention or imitation. In AWS, the tag value has a limit of 255 characters, which is long enough to store a meaningful description, such as “This bucket is used to store uploaded S3 images before they are approved and moved to long-term storage.” A purpose tag and value such as that can save an organization many hours of research a few years down the road when the original team members have all moved on.
Conclusion
The parallels between file management on personal devices and resource management in AWS are striking. In both cases, the accumulation of digital assets—be it files or cloud resources—poses significant organizational challenges. Tags emerge as a universal solution, offering flexibility, clarity, and efficiency in managing these complexities. By adopting tagging practices, individuals can regain control over their personal data, while organizations can optimize their cloud environments, reduce costs, and improve operational efficiency.
In conclusion, the digital era demands innovative approaches to managing the growing volume of information and resources. Tags provide a versatile and powerful mechanism to tackle this challenge, bridging the gap between personal and professional data management. Whether organizing files on a laptop or orchestrating resources in AWS, embracing a well-thought-out tagging strategy can transform chaos into order, paving the way for enhanced productivity and success in an increasingly digital world.