You might have noticed that AWS allows you to specify tags for basically any resource. Why and how should you tag anything?
Transparency and traceability
Tagging resources, templates, and jobs helps keeping track of your AWS resource groups. Sure, it doesn’t seem important when you’ve just started and are easily managing a handful of resources. But as your business, customer base, and engineering teams grow, knowing which resource belongs to whom and whether it still is needed becomes a challenge.
Cut costs
A fair amount of costs can be saved by deleting unused resources. Why pay for resources, if you don’t need them any more? The problem is: how do you know they are unused? In many cases, you can check performance and usage metrics to determine that. However, it might happen that you are about to delete a backup that is required for the disaster recovery of your production environment. Proper tagging can help avoid such mistakes.
Tags can also be used as custom cost allocation tags. This can help break down and assign costs to products, services, and teams.
Tagging best practices
There are no tagging best practices that fit every business and development context. You can start with a minimum set of AWS tags to identify the owner and the purpose of the resource. However, these tags should be consistent across the organization. You can achieve that by creating a cross-functional task force to create tagging policies and conventions. As a short-term goal, start by tagging resources that are significant contributors to your monthly bill, e.g. EC2 and RDS instances, S3 buckets, and EBS volumes. Then expand the tagging to other resources, introduce both automated and mandatory tagging of resources, and delete untagged resources to keep things tidy. As a long-term goal, you should accurately tag every resource your organization creates and uses. This will avoid accidental deletion, and aid your cost-saving operations.
Conclusion
AWS tagging is an often undervalued but vital practice to manage cloud resources and keep costs under control.
References
- Implement AWS resource tagging strategy using AWS Tag Policies and Service Control Policies (SCPs). (2021, October 28). Amazon Web Services. Retrieved April 29, 2022, from https://aws.amazon.com/blogs/mt/implement-aws-resource-tagging-strategy-using-aws-tag-policies-and-service-control-policies-scps/
- Remediating Noncompliant AWS Resources by AWS Config Rules – AWS Config. (n.d.). AWS Config Developer Guide. Retrieved April 29, 2022, from https://docs.aws.amazon.com/config/latest/developerguide/remediation.html