Tagging a file using an S3 access point - FSx for OpenZFS

Tagging a file using an S3 access point

The following put-object-tagging example command shows how you can use the AWS CLI to add a tag-set through an access point. Each tag is a key-value pair. For more information, see Categorizing your storage using tags in the Amazon Simple Storage Service User Guide.

The example adds a tag-set to the existing file my-image.jpg using the access point my-openzfs-ap.

$ aws s3api put-object-tagging --bucket my-openzfs-ap-hrzrlukc5m36ft7okagglf3gmwluquse1b-ext-s3alias --key my-image.jpg --tagging TagSet=[{Key="finance",Value="true"}]

You can also use the REST API to add a tag-set to an object through an access point. For more information, see PutObjectTagging in the Amazon Simple Storage Service API Reference.