Option to add tags (not etags) to the object
jayush12 opened this issue · comments
Hi,
Is there a way to add tags to the object I want to upload or to any existing object. If not possible as of now can you please help how can I do it.
Hi @jayush12
My understanding, based on the AWS API documentation, is that S3 supports the tagging of objects only once they're uploaded via the PutObjectTagging
.
The library does not support the PutObjectTagging
operation at the moment. Although judging from the documentation, it should be relatively simple to implement (if not slightly annoying as the expected request body is... 🥁 XML).
We generally implement features on a per-request basis; thus, now that this issue is open, this feature will remain on our radar, and we shall get to implement it in the future. However, feel free to implement it and open a PR to speed up the process. That would be much appreciated.
From what I can see in the documentation, you would need to replicate our [S3Client.putObject](https://github.com/grafana/k6-jslib-aws/blob/main/src/internal/s3.ts#L181)
method and tailor the request to what S3 expects. During the development process, you can use the npm run webpack
command to update the build files in the build
folder. Those build files will contain the newer symbols, including your changes, and you should be able to import them from a local k6 script 👍🏻
Let me know if you intend to implement it, or if you'd rather wait, and if I can help you any further in any way 🙇🏻