-
I'm writing a non-AWS deployed service that is using AWS features - Cognito, specifically. And I'm wanting to be able to programmatically construct the What I've done so far is:
Where Is there some correct way to achieve this? Or am I just wasting my time? Cheers |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Environment variables take priority over profile files in the default provider. If you want to force it to use the profile file instead of the env var, you can supply it with a |
Beta Was this translation helpful? Give feedback.
-
But is there a decent way for me to provide the region and credentials that
I've loaded myself? Or else is there a way to have the program terminate
with a decent error message when loading the config? Because right now what
happens is that everything works until the first time the API is called,
and then that call returns an error when it would be much nicer to have
service startup fail instead ..
Cheers
…On Mon, 28 Nov 2022, 21:50 John DiSanti, ***@***.***> wrote:
Environment variables take priority over profile files
<https://docs.rs/aws-config/0.51.0/aws_config/default_provider/region/fn.default_provider.html>
in the default provider. If you want to force it to use the profile file
instead of the env var, you can supply it with a ProfileFileRegionProvider
<https://docs.rs/aws-config/0.51.0/aws_config/profile/struct.ProfileFileRegionProvider.html>
directly instead of aws_config::default_provider::region::Builder....
—
Reply to this email directly, view it on GitHub
<#672 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAQEGFLJEPQROEES6XYXZ3WKUSK5ANCNFSM6AAAAAASNZOJXA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Environment variables take priority over profile files in the default provider. If you want to force it to use the profile file instead of the env var, you can supply it with a
ProfileFileRegionProvider
directly instead ofaws_config::default_provider::region::Builder...
.