Replace all object tags
You can use Amazon S3 Batch Operations to perform large-scale batch operations on Amazon S3 objects. The Replace all object tags operation replaces the object tags on every object listed in the manifest. An object tag is a key-value pair of strings that you can use to store metadata about an object.
To create a Replace all object tags job, you provide a set of tags that you want to apply. S3 Batch Operations applies the same set of tags to every object. The tag set that you provide replaces whatever tag sets are already associated with the objects in the manifest. S3 Batch Operations doesn't support adding tags to objects while leaving the existing tags in place.
If the objects in your manifest are in a versioned bucket, you can apply the tag set to specific versions of every object. To do so, specify a version ID for every object in the manifest. If you don't include a version ID for any objects, S3 Batch Operations applies the tag set to the latest version of every object. For more information about Batch Operations manifests, see Specifying a manifest.
For more information about object tagging, see Categorizing your storage using tags in this guide, and see PutObjectTagging, GetObjectTagging, and DeleteObjectTagging in the Amazon Simple Storage Service API Reference.
To use the console to create a Replace all object tags job, see Creating an S3 Batch Operations job.
Restrictions and limitations
When you're using Batch Operations to replace object tags, the following restrictions and limitations apply:
-
The AWS Identity and Access Management (IAM) role that you specify to run the Batch Operations job must have permissions to perform the underlying
PutObjectTagging
operation. For more information about the permissions required, see PutObjectTagging in the Amazon Simple Storage Service API Reference. -
S3 Batch Operations uses the Amazon S3 PutObjectTagging operation to apply tags to each object in the manifest. All restrictions and limitations that apply to the underlying operation also apply to S3 Batch Operations jobs.