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

Extra disk space usage and delayed uploads when uploading large files to S3 #5439

Closed
zamzamfp opened this issue Sep 19, 2024 · 8 comments
Closed
Labels
question General question s3 Issues related to S3

Comments

@zamzamfp
Copy link

State your question
We are facing an issue with the transferUtility when using multipart upload to upload large files (e.g., 10GB). The SDK chunks the entire file into smaller parts at the beginning, as stated in this question also, before the upload even starts. This behaviour requires the device to have enough additional storage space (e.g., 10GB extra) to accommodate the chunked file. It also significantly delays the upload process, as it can take up to a minute for the chunking to complete, with no clear indication of this happening unless debug logging is enabled.

Questions:

  1. Is there a technical reason the chunking process has to occur entirely before the upload starts, rather than chunking parts on-the-fly (i.e., chunk the first parts, upload them, and then proceed with the rest)?
  2. Are there any plans to change this behavior in the future to improve efficiency?
  3. Is there a way to track the progress of the chunking process so we can communicate it in the UI?

Which AWS Services are you utilizing?
S3

Environment(please complete the following information):

  • SDK Version: latest which is 2.37.1
@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending response from an Amplify team member labels Sep 19, 2024
@phantumcode
Copy link
Member

@zamzamfp Thanks for submitting the issue. We will investigate and provide updates here.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Sep 19, 2024
@phantumcode phantumcode added question General question pending-maintainer-response Issue is pending response from an Amplify team member s3 Issues related to S3 and removed pending-maintainer-response Issue is pending response from an Amplify team member labels Sep 19, 2024
@zamzamfp
Copy link
Author

Hi @phantumcode, do you have any updates?

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Sep 26, 2024
@ruisebas ruisebas removed the pending-triage Issue is pending triage label Sep 27, 2024
@ruisebas
Copy link
Member

Hi @zamzamfp, answering your questions:

  1. Multipart upload has been implemented a long time ago and this was the approach that was chosen at the time.
  2. We currently have no plans on refactoring this implementation
  3. There's no way to track the chunking process.

The Amplify Library for Swift behaves the way you suggested and only creates the partial temp files right before they are uploaded.

Unless your application absolutely requires the usage of the AWS SDK for iOS for some use case, we recommend you consider migrating to Amplify.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Sep 30, 2024
@zamzamfp
Copy link
Author

Hi @ruisebas,Thanks for the response. Would you say the Amplify Library for Swift provides a better solution for uploading large files to S3, especially when compared to transferUtility.uploadUsingMultiPart, including support for background uploads?

@github-actions github-actions bot added the pending-maintainer-response Issue is pending response from an Amplify team member label Sep 30, 2024
@ruisebas
Copy link
Member

Yes, the AWS Amplify Library for Swift is a newer multiplatform library that supports many common mobile use cases and takes advantage of Swift's latests improvements and features (e.g. async/await). It's built on top of the new AWS SDK for Swift.

Regarding uploading large files specifically, it does support background uploads (within the limitations imposed by the running Operation System).
You can learn more about Amplify Storage in our documentation page.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending response from an Amplify team member label Sep 30, 2024
@ruisebas
Copy link
Member

ruisebas commented Oct 1, 2024

@zamzamfp since you've also raised #5440, I should call out that unlike the Transfer Utility, Amplify Storage currently does not support resuming interrupted uploads due to the app being terminated.

@ruisebas
Copy link
Member

ruisebas commented Oct 3, 2024

Closing as all questions have been answered.

@ruisebas ruisebas closed this as completed Oct 3, 2024
Copy link

github-actions bot commented Oct 3, 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.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question General question s3 Issues related to S3
Projects
None yet
Development

No branches or pull requests

3 participants