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(storage): credentials expires after 1 hour #13329

Merged
merged 2 commits into from
May 16, 2024

Conversation

AllanZhengYP
Copy link
Contributor

@AllanZhengYP AllanZhengYP commented May 2, 2024

Description of changes

Supply credentials provider instead of resolved static credentials object to the S3 client. As a result, underlying S3 client can always access up-to-dated credentials. This solves the issue for credentials expiration in long-running processes like MPU

Issue #, if available

#13307

Description of how you validated changes

  • Manual validation
    Screenshot 2024-05-03 at 3 51 29 PM

  • Unit test

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

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

@AllanZhengYP AllanZhengYP marked this pull request as ready for review May 2, 2024 18:53
@AllanZhengYP AllanZhengYP requested a review from a team as a code owner May 2, 2024 18:53
ghost

This comment was marked as abuse.

@aws-amplify aws-amplify deleted a comment May 2, 2024
@aws-amplify aws-amplify deleted a comment May 2, 2024
@aws-amplify aws-amplify deleted a comment May 2, 2024
@aws-amplify aws-amplify deleted a comment May 2, 2024
@AllanZhengYP AllanZhengYP force-pushed the fix-storage-upload-expire branch 2 times, most recently from 0ba9cf0 to daf7a88 Compare May 3, 2024 20:11
Copy link
Contributor

@erinleigh90 erinleigh90 left a comment

Choose a reason for hiding this comment

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

Managed to orphan a good chunk of my comments, but mainly LGTM. I was just concerned about the change in functionality between toHaveBeenCalledWith and 'toBeLastCalledWithConfigAndInput` when we are not asserting the number of times we expect the function to be called in the test classes.

Copy link
Contributor

@erinleigh90 erinleigh90 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Allan!

@ashika112
Copy link
Contributor

ashika112 commented May 16, 2024

Overall i am not against merging, but i think we should avoid type casting. Why are we casting it? We realized lotta issue because of type casts even in tests during gen2 work. Dont mind a separate followup

@AllanZhengYP AllanZhengYP merged commit d7d33da into aws-amplify:main May 16, 2024
30 checks passed
@AllanZhengYP AllanZhengYP deleted the fix-storage-upload-expire branch May 16, 2024 21:29
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.

None yet

3 participants