Add tagging to S3 objects and buckets
Is there currently (or planned) a way to set tags or metadata for s3objects? I've had a look around and can't see a way to do this in awless (or via AWS CLI) but it looks like it can be done via the AWS APIs.
is this something that might be added in the future?
@macbutch Sorry for the delay here I got resourced on another project.
I will have a look around but can you point out to which specific AWS APIs you are thinking of? Thanks.
@simcap thanks for the reply. Here is how tags can be set for an S3 object:
https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUTtagging.html
I believe metadata can only be set when the file is uploaded/created. A little harder to link you to the docs but here where it describes the x-amz-meta- request headers.
https://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPUT.html
My use case would work with either tags or metadata - thinking maybe I missed a way to do it. I'll try again today.
@macbutch Thanks for the pointers. That has not been done yet as s3object tags are different from ec2 tags.
But this is definitely something to add and where the design of awless allows to do that easily.
We would basically push the tags when we do an awless create s3object, or maybe better when doing awless update s3object. The param (ex: named tags)would have the form of something like: awless update s3object .... tags=key1:value1,key2:value2
We will see if we can include that in the next 0.1.10 or 0.1.11 but do not count on it too soon.
Is tag creation on the bucket itself supported?
@cfredhart No.
It is basically the same behavior as s3 objects explained above. I will edit the title of the issue so that we do the tagging for both the bucket and s3object