How do I get the aws_config to load environment variables such as AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY? #985
Unanswered
spencerbart
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This is the code println!("AWS_ACCESS_KEY_ID: {}", std::env::var("AWS_ACCESS_KEY_ID").unwrap());
println!("AWS_SECRET_ACCESS_KEY: {}", std::env::var("AWS_SECRET_ACCESS_KEY").unwrap());
let aws_config = aws_config::load_from_env().await;
let ses_client = aws_sdk_sesv2::Client::new(&aws_config); It crashes because it tries to load a non-existent file |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I cannot get aws_config::load_from_env() to load environment variables. It keeps loading .aws/credentials and not the environment variables.
I make sure those credentials are present in the environment variables before I load aws_config but it still will not load them.
Beta Was this translation helpful? Give feedback.
All reactions