Replies: 2 comments 2 replies
-
this extremely helpful. thanks for taking the time to write this up. We're going to take another pass on both the trait as well as write a usage guide: #175. And for your and other's future context, |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm not sure why you need a let account = account.to_string();
let creds = async_provide_credentials_fn(move || get_creds_form_outside_prosses(&account)); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had a chance to try
async_provide_credentials_fn
andLazyCachingCredentialsProvider
. I may have bean using them wrong, but here is how it went for me. My use case looked like:Now when I am typing this out, I am realizing that somehow (I don't see how)
Credentials
from aCredentialsResult
implsAsyncProvideCredentials
. So using it directly works, and is much cleaner then what I tried before!Yesterday, I started by looking at
AsyncProvideCredentials
witch is impled byasync_provide_credentials_fn
witch has an example in the doc string, so let me try using that.Why
'static
? because.credentials_provider(
requires itimpl aws_auth::provider::AsyncProvideCredentials + 'static
.I know the arcane trick to get a
&'static str
! Then I end up needing to add amove
And this is a working solution!
'static
? How can we make this better?Some one told me to try
LazyCachingCredentialsProvider
. So:but
LazyCachingCredentialsProvider
in more then oneconfig
?config
orclient
that can be used for different services?Beta Was this translation helpful? Give feedback.
All reactions