Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to add tags (not etags) to the object #24

Open
jayush12 opened this issue Nov 24, 2022 · 2 comments
Open

Option to add tags (not etags) to the object #24

jayush12 opened this issue Nov 24, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jayush12
Copy link

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.

@oleiade oleiade self-assigned this Nov 24, 2022
@oleiade oleiade added the enhancement New feature or request label Nov 24, 2022
@oleiade oleiade assigned oleiade and unassigned oleiade Nov 24, 2022
@oleiade
Copy link
Member

oleiade commented Nov 24, 2022

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 🙇🏻

@jayush12
Copy link
Author

jayush12 commented Nov 24, 2022

Hi @oleiade ,

I am developing an in-house library to do the same, though we have some specific use cases at our end. Once it is done may be then I can implement it here too.

@oleiade oleiade added this to the v0.11.0 milestone Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants