-
Notifications
You must be signed in to change notification settings - Fork 13
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
[S3 Client] Skip upload when uploaded object will overwrite identical object #243
Comments
The HeadObject operation is what you're looking for, it retrieves metadata from an object without returning the object itself. |
Thank you! Then I guess my feature request is for the putObject action to have an option that, if enabled, would lead the client to first call HeadObject and call API PutObject only if object to upload is different from object currently stored in S3 |
@psantus that would be a feature request for S3, the SDK does not customize API operations. I can forward your request to the S3 team if you want. If you're trying to avoid accidental overwrite, take a look at Object Versioning - every putObject call will create a new version. |
Hi @debora-ito, No I meant for the S3 client to first check existing file eTag before trying to upload. I'm not trying to avoid accidental overwrite (otherwise indeed I'd have used Object Versioning) but rather avoid the charge of PutObject API calls when unnecessary. |
Yes, that is what I meant by customizing API operations :) SDK clients are automatically generated, they basically call the service API operations as they are, with the same options available for each operation. The clients don't have additional logic or validation on the SDK side. So if you need a new option on S3 PutObject, it needs to be implemented by the service to be available in the SDK. |
That I wasn't aware of ;) |
For visibility to other SDKs, I'm moving this to the |
The main issue here is that AWS S3 service does not support conditional requests per RFC-7232 for |
|
Since PUT requests are more expensive than GET, before uploading an object it'd be great to check a fully identical object doesn't already exist.
Describe the Feature
For some workloads to be repeatable/idempotent, we sometimes need to be able to try object upload without the pain of checking the object already exists.
Is your Feature Request related to a problem?
Currently, API users who want to do that
so it ends up being a quite expensive operation.
Proposed Solution
Describe alternatives you've considered
None :)
Additional Context
We use S3 to archive request/response with external 3rd parties for audit purposes
Your Environment
The text was updated successfully, but these errors were encountered: