Tags in AWS are key-value metadata labels attached to AWS resources—such as Amazon EC2 instances, Amazon S3 buckets, and Lambda functions—to help organize, track, and manage cloud infrastructure. Each tag consists of a case-sensitive key and an optional value. ---------------------------------------- Types of Tags ---------------------------------------- User-defined tags: Created and managed by you via the AWS Console, CLI, API, or Infrastructure as Code tools. They are case-sensitive and subject to resource limits (typically up to 50 tags per resource). AWS-generated tags: Automatically applied by AWS services (such as CloudFormation or cost allocation features) using reserved prefixes like aws:. They are read-only and do not count toward user-defined tag limits. ---------------------------------------- Common Usage Examples ---------------------------------------- Cost allocation: Group billing reports and Cost Explorer data by project, department, or cost center (e.g. CostCenter: Billing or Team: Payments). Environment & ownership tracking: Identify where a resource belongs and who owns it (e.g. Environment: Production, Owner: user.xyz@example.com). Automation: Target specific resources for scheduled actions, backups, or clean-up scripts (e.g. AutoShutdown: True on dev/sandbox instances). Access control (ABAC): Use tag keys and values in IAM policies to grant or restrict permissions based on matching resource and user tags. Resource grouping & filtering: Search, filter, or group related resources together using tools like AWS Resource Groups and [Tag Editor] ---------------------------------------- Key Rules and Best Practices ---------------------------------------- Do not store sensitive data: Tags are unencrypted metadata; never put passwords, secrets, or personally identifiable information (PII) in tag keys or values. Standardize naming: Enforce consistent casing (such as all lowercase), spelling, and tag keys across teams or accounts using AWS Organizations tag policies. Avoid the aws: prefix: Reserved for AWS-generated tags.