A unified Python interface for managing AWS resource tags
Project description
better-aws-tags
A unified Python interface for managing AWS resource tags.
AWS provides multiple tagging APIs across services, including the Resource Groups Tagging API and service-specific implementations such as EC2, S3, and IAM. This library abstracts these differences behind a single API that accepts any valid ARN and handles service routing automatically.
Getting Started
import better_aws_tags as bats
# Get tags for resources
tags = bats.get_tags(["arn:aws:s3:::my-bucket", "arn:aws:iam::123456789012:role/my-role"])
# Set tags on resources
bats.set_tags(["arn:aws:s3:::my-bucket"], {"Environment": "prod", "Team": "platform"})
How It Works
The library routes ARNs to the appropriate handler:
- Most resources use the Resource Groups Tagging API (1000+ supported resource types)
- Some IAM resources (roles, users, policies) require IAM-specific APIs
This routing is transparent - just pass ARNs and the library handles the rest.
Reference
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/overview.html
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_TagResources.html
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html
- https://docs.aws.amazon.com/ARG/latest/userguide/supported-resources.html
AWS Resources and Resource Types:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters