AWS Tagging Best Practices

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.

Leave a Reply

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

Related Cloud Tutorials

Control traffic to AWS resources using security groups
How to configure and use the Terraform aws_security_group and aws_security_group_rule resource blocks to create and manage AWS Security Groups and secure the infrastructure.
AWS Routing Tables with Terraform
How to configure and use the Terraform aws_route_table, aws_route, and aws_main_route_table_association resource blocks to create and manage AWS Routing Tables.
AWS NAT Gateway
How to configure and use the Terraform aws_nat_gateway and aws_eip resource blocks to create and manage AWS NAT Gateway and its corresponding Public IPs inside each availability zone to enable Internet access from instances in private subnets.
An AWS NAT Gateway is a managed service that allows instances in a private subnet to connect to the Internet while keeping them secure. It provides network address translation (NAT) for outbound traffic, allowing resources in a private subnet to access the internet while maintaining a private IP address.
AWS Internet Gateway
How to configure and use the Terraform aws_internet_gateway resource block to create and manage AWS Internet Gateway inside a VPC to enable instances access to and from the Internet.
Javier Ruiz Cloud and SaaS Expert

Javier Ruiz

IT Wonder Lab tutorials are based on the diverse experience of Javier Ruiz, who founded and bootstrapped a SaaS company in the energy sector. His company, 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 over 25 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.

Are you looking for cloud automation best practices tailored to your company?

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