aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.36k stars 2.1k forks source link

fix(storage): credentials expires after 1 hour #13329

Closed AllanZhengYP closed 1 day ago

AllanZhengYP commented 2 weeks ago

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

Checklist

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

ashika112 commented 1 day ago

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