Reputation: 1058
I have different types of file on S3 bucket. Assigned tag(key-value pair) to each file to easily identify.
Example: key is type and value is sunset
I am regularly archiving all these files on the Glacier.
My question: How can I restore objects from Glacier using a specific tag (key-pair)?
I want to restore all files which have type=sunset
.
Is any CLI available for this?
Upvotes: 0
Views: 305
Reputation: 269091
This does not appear to be possible.
Not only does the restore_object()
NOT support tags, but there does not appear to be any Amazon S3 API call that can retrieve or list objects by tag. Even Amazon S3 Inventory does not provide a list of tags.
It appears that the only way to retrieve the Tags on an object is to use get_object_tagging()
, but that command requires a specific object to be referenced.
Thus, it seems that Tags are a good way to provide additional information about an object, but cannot be used to locate an object.
You will likely need to keep your own database of information if you wish to locate objects via additional data normally stored in tags.
Upvotes: 2