Automatically refreshing credentials with STS AssumeRole
for API Gateway request signing
#1177
-
Hello! We have a somewhat odd use case and I'm looking into ways to leverage the SDK to make our lives easier. Currently, we're calling Our tentative plan is to keep the credentials behind a lock of some sort, then re-fetch them when requests start failing with One possibility I see is giving an SDK client a
Again, we can do the synchronization ourselves, but I want to make sure I'm not missing some other SDK feature that would make this easier. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for posting! Normally, you'd reach out something like AssumeRoleProvider, create an instance of it, and pass it to the credentials_provider method on Do you use |
Beta Was this translation helpful? Give feedback.
Thanks for posting! Normally, you'd reach out something like AssumeRoleProvider, create an instance of it, and pass it to the credentials_provider method on
ConfigLoader
. Once you constructed a service client fromConfigLoader
, then thatAssumeRoleProvider
would be backed by an identity cache (ex. lazy identity cache). This cache keeps track of credentials' expiry and it automatically refreshes credentials when they're about to expire.Do you use
ConfigLoader
to create a service client? If not, how do you construct a service client currently?