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

fix: use s3.upload instead of s3.putObject #13493

Merged
merged 3 commits into from
Dec 26, 2023

Conversation

edwardfoyle
Copy link
Contributor

Description of changes

Replaces usage of s3.putObject with s3.upload when uploading project files. s3.upload handles retries / chunking / multipart when uploading whereas putObject does not. On slow networks this caused errors like the ones linked below.

Issue #, if available

#7632
#4113
#8239
#4183

Description of how you validated changes

Validated changes locally by simulating a slow network using throttle and making changes to a project with a large lambda zip file. Before the change I got the timeout error and after the change the upload went through.

Writing an e2e test for this may be more effort than it's worth. The throttle utility I used to simulate a slow network requires running as sudo which means it will be difficult to use in CI/CD. Open to suggestions.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@edwardfoyle edwardfoyle requested a review from a team as a code owner December 20, 2023 00:03
0618
0618 previously approved these changes Dec 20, 2023
Copy link
Contributor

@0618 0618 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@0618
Copy link
Contributor

0618 commented Dec 20, 2023

AmplifyCLI-PR-Testing failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants