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

Support VersionId for S3 reads #721

Closed
tomkam-python opened this issue May 27, 2021 · 2 comments
Closed

Support VersionId for S3 reads #721

tomkam-python opened this issue May 27, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request minor release Will be addressed in the next minor release ready to release
Milestone

Comments

@tomkam-python
Copy link

Is your idea related to a problem? Please describe.
I'm working on a Lambda triggered by an S3 object upload to a versioned bucket. I would like to ensure that I am reading the version of the object reference in the upload event triggering said lambda.

client.get_object() of boto3 allows users to get a hold of a specific object version by passing it as an optional keyword argument VersionId, but this is not surfaced to any of the wr.s3.read* methods.

Describe the solution you'd like
There are 3 options of handling this:

  1. Optionally parsing the path argument to retrieve in the same format as in the S3 REST API: ?versionId=${VERSION_ID}
  2. Adding VersionId to the list of allowed s3_additional_kwargs and use where appropriate
  3. Adding VersionId as another optional parameter to wr.s3.read* methods.

Which option would be preferable, and are there any concerns with adding this functionality at all?

@tomkam-python tomkam-python added the enhancement New feature or request label May 27, 2021
@kukushking
Copy link
Contributor

I think option 3 - adding VersionId parameter would be the best. If I'm not mistaken, you can already use s3_additional_kwargs for what you are trying to achieve, but having a dedicated parameter is way more user-friendly.

@kukushking kukushking self-assigned this Jun 1, 2021
@kukushking kukushking added minor release Will be addressed in the next minor release ready to release labels Jun 16, 2021
@kukushking
Copy link
Contributor

Added the feature - it be included in the next release. Until then, you can test it as follows:

pip uninstall awswrangler -y
pip install git+https://github.com/awslabs/aws-data-wrangler.git@main

Thanks for your interest!

@kukushking kukushking added this to the 2.9.0 milestone Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor release Will be addressed in the next minor release ready to release
Projects
None yet
Development

No branches or pull requests

2 participants