API/SDK to Filter/Search Objects Based on Object Tags
- 12 Aug 2024
- 1 Minute to read
- Print
- PDF
API/SDK to Filter/Search Objects Based on Object Tags
- Updated on 12 Aug 2024
- 1 Minute to read
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
How to use API/SDK to filter/search objects based on object tags
To filter and search objects based on tags:
- Install AWS CLI.
- Configure the AWS CLI profile for Wasabi account using the Wasabi keys.
- Install Python 3+ version to run this script.
- Install the AWS SDK for Python using pip.
If you are specifying a prefix, be sure to enter the FULL PREFIX PATH (bucket name NOT included) and the prefix should not start with a forward slash (/). For example, folder1/sub-folder.
Script to Filter all Objects Using Tags in a Prefix/Bucket
Enter your Bucket name and Prefix, the tag key and value, and the Region of the Bucket.
Example output:
Script to View All Object Tags in a Prefix/Bucket
Enter your Bucket Name, Prefix, and the region of the Bucket.
Example output:
The Python scripts are attached to this article.