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

Example for MultipartUpload #4233

Closed
daveisfera opened this issue Aug 8, 2024 · 5 comments
Closed

Example for MultipartUpload #4233

daveisfera opened this issue Aug 8, 2024 · 5 comments
Assignees
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue response-requested Waiting on additional information or feedback. s3

Comments

@daveisfera
Copy link

Describe the issue

There doesn't appear to be any documentation for how to use MultipartUpload and it errors out saying that the upload_id doesn't exist when trying to use it.

Here's example code:

from uuid import uuid4

import boto3


s3_resource = boto3.resource("s3")
mpu = resource.MultipartUpload("test_bucket", f"test_mpu.txt", str(uuid4()))
for n in range(4):
    part = mpu.Part(n)
    part.upload(Body=open(f"test_{n}.txt").read())

And here's the error that happens:

NoSuchUpload: An error occurred (NoSuchUpload) when calling the UploadPartCopy operation: The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed.

Links

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/multipartupload/index.html

@daveisfera daveisfera added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Aug 8, 2024
@RyanFitzSimmonsAK
Copy link
Contributor

Hi @daveisfera, thanks for reaching out. You're right that the documentation for the resources page is a bit lacking, but fortunately, it's better documented elsewhere. Here's the client MPU operation, and the S3 customization reference. Both of those should be helpful. Please let me know if you have any other questions.

@RyanFitzSimmonsAK RyanFitzSimmonsAK self-assigned this Aug 9, 2024
@RyanFitzSimmonsAK RyanFitzSimmonsAK added response-requested Waiting on additional information or feedback. s3 p3 This is a minor priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Aug 9, 2024
@daveisfera
Copy link
Author

Those are both using Client rather than Resource and isn't that at least partially deprecated?

@RyanFitzSimmonsAK
Copy link
Contributor

Nope! Client is fully supported. Resources aren't deprecated, but they are feature-frozen.

@daveisfera
Copy link
Author

Doh! I had it backwards and Resource is the one that's no longer being developed

Copy link

github-actions bot commented Aug 9, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation. p3 This is a minor priority issue response-requested Waiting on additional information or feedback. s3
Projects
None yet
Development

No branches or pull requests

2 participants