HEX
Server: Apache
System: Linux pdx1-shared-a2-09 6.6.116-grsec-jammy-dirty #1 SMP Sat Nov 8 00:02:42 UTC 2025 x86_64
User: dh_pvsc7i (5084578)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/awscli/examples/s3api/get-object-tagging.rst
**To retrieve the tags attached to an object**

The following ``get-object-tagging`` example retrieves the values for the specified key from the specified object. ::

    aws s3api get-object-tagging \
        --bucket my-bucket \
        --key doc1.rtf

Output::

    {
        "TagSet": [
            {
                "Value": "confidential",
                "Key": "designation"
            }
        ]
    }

The following ``get-object-tagging`` example tries to retrieve the tag sets of the object ``doc2.rtf``, which has no tags. ::

    aws s3api get-object-tagging \
        --bucket my-bucket \
        --key doc2.rtf

Output::

    {
        "TagSet": []
    }


The following ``get-object-tagging`` example retrieves the tag sets of the object ``doc3.rtf``, which has multiple tags. ::

    aws s3api get-object-tagging \
        --bucket my-bucket \
        --key doc3.rtf

Output::

    {
        "TagSet": [
            {
                "Value": "confidential",
                "Key": "designation"
            },
            {
                "Value": "finance",
                "Key": "department"
            },
            {
                "Value": "payroll",
                "Key": "team"
            }
        ]
    }