API/SDK to Filter/Search Objects Based on Object Tags
    • 12 Aug 2024
    • 1 Minute to read
    • PDF

    API/SDK to Filter/Search Objects Based on Object Tags

    • PDF

    Article summary

    How to use API/SDK to filter/search objects based on object tags

    To filter and search objects based on tags:

    1. Install AWS CLI.
    2. Configure the AWS CLI profile for Wasabi account using the Wasabi keys.
    3. Install Python 3+ version to run this script.
    4. 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.