AWS Tagging Best Practices

Effective infrastructure resource tagging can greatly improve management, IaC, monitoring and cost visibility in AWS.

AWS Resource Tagging

Tags are used for provisioning, monitoring, and cost control.

  • Consistent Naming: Use a consistent naming convention for your tags to make them easy to understand and manage.
  • Use Tags Strategically: Tag resources based on their purpose, owner, environment, or any other relevant criteria. This helps with organization.
  • Automation: Consider using automation tools like AWS Lambda to automatically assign tags to resources based on predefined rules.
  • Enforce Tagging: Use AWS Identity and Access Management (IAM) policies to enforce tagging policies within your organization.
  • Cost Allocation: Use tags to track and allocate costs effectively. This is especially important in multi-tenant environments.
  • Monitor and Audit: Regularly review and audit your tagged resources to ensure compliance with tagging policies.
  • Document Tagging Standards: Document your tagging standards and communicate them to your team to ensure consistency.
  • Tagging at Resource Creation: Whenever possible, tag resources at the time of creation to avoid missing tags.
  • Avoid Over-Tagging: While tagging is important, avoid over-tagging, as it can lead to confusion and unnecessary complexity.
  • Educate Teams: Educate your teams on the importance of tagging and how it benefits resource management and cost tracking.

Recommended AWS tags

All the AWS resources created with Terraform should have tags added that follow a company-wide standard.

ansible-aws-ec2-terraform-tags - ansible-aws-ec2-terraform-tags-ec2.png

IT Wonder Lab recommended tags:

  • Name [name]: the name of the instance or resource. It should be unique and follows the Cloud-Resource-Environment-Visibility-Name/ID format (see EC2 Instances and Resource Security for details)
  • Private Name [private_name]: The private name for this element, is used for DNS registration in a private zone and should follow a standard and be unique. It can be used for monitoring and server naming.
  • Public Name [public_name]: The public name for the element, it can be used in DNS registration in public zones and can be the same for many instances, as instances can be behind load balancers. In RDS it is the same as the private name.
  • App [app]: The name of the main application that will be used in the resource.
  • App ID [app_id]: A unique characteristic of the application or a number that can be used to differentiate multiple different instances of the same application, for example, imagine you have to release the same application in the same environment, App ID could be the release number.
  • OS [os]: The operating system of the instance, useful for applying the basic configuration.
  • Environment [environment]: Used for environment identification, it is a 3 letter acronym for the environment:
  • Cost Center [cost_center]:  one or many cost centers that this resource should be assigned to. The cost center is used in billing to classify resources, for example, if you provide resources for different customers, some resources are shared and others are costs associated with a specific customer.

Values should all be in lowercase without spaces.

Table of Contents
Primary Item (H2)Sub Item 1 (H3)Sub Item 2 (H4)
Sub Item 3 (H5)
Sub Item 4 (H6)

Related Cloud Tutorials

AWS Security Groups’ Best Practices
AWS Security Groups are virtual firewalls that control inbound and outbound traffic to and from Amazon Web Services (AWS) resources, such as EC2 and RDS instances.
AWS and Terraform Naming Best Practices
Terraform and AWS resource naming should follow a company standard. Each company has different requirements and the standard should be adjusted.
AWS S3, is a highly scalable and durable object storage used for data storage, backup, content distribution, data archiving, and as a foundation for building cloud-native applications.
Amazon Elastic Compute Cloud, is a web service offered by Amazon Web Services (AWS) that provides resizable and scalable compute capacity in the cloud. In simple terms, AWS EC2 allows you to launch and manage virtual machines, known as instances, in the AWS cloud.
AWS AMI, or Amazon Machine Image, is a pre-configured virtual machine image used to create and launch Amazon Elastic Compute Cloud (EC2) instances
terraform-aws-ec2-rds-basic-free - ITWL_AWS_Terraform_VPC_WP_RDS_tags.png
How to Share Infrastructure in Multiple Terraform Projects?
Methods to divide Terraform AWS infrastructure between different teams and projects using Terraform: Using Terraform Data Sources, Accessing a Remote Terraform State-file From Other Project, ...
How to use Ansible and Terraform together
This Ansible AWS tutorial shows how to use Ansible and its dynamic inventory to provision the software and configuration of infrastructure that has been created with Terraform.
AWS Terraform module
How to disable AWS instance destroy with Terraform?
Techniques to prevent infrastructure destroy in Terraform by protecting selected instances and resources from being accidentally destroyed.
terraform-aws-ec2-rds-basic-free - ITWL_AWS_Terraform_VPC_WP_Security1.png
How to programmatically use your public Internet IP address in Terraform?
Obtain your public IP address and use it in Terraform to create AWS Security Rules.
terraform-aws-ec2-rds-basic-free - ITWL_AWS_Terraform_VPC_WP_RDS_tags.png
Creating AWS RDS Database with Terraform (4/5)
Tutorial and source code explaining how to create and manage MariaDB (or MySQL) RDS database with Terraform in AWS.

Javier Ruiz

IT Wonder Lab tutorials are based on the rich and diverse experience of Javier Ruiz, who founded and bootstrapped a SaaS company in the energy sector. His company, which was later acquired by a NASDAQ traded company, managed over €2 billion per year of electricity for prominent energy producers across Europe and America. Javier has more than 20 years of experience in building and managing IT companies, developing cloud infrastructure, leading cross-functional teams, and transitioning his own company from on-premises, consulting, and custom software development to a successful SaaS model that scaled globally.

2 comments on “AWS Tagging Best Practices”

Leave a Reply

Your email address will not be published. Required fields are marked *

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram