macro_rules! build_environment_aws_credentials {
($prefix:literal) => { ... };
() => { ... };
}Expand description
Reads AWS credentials from the environment variables
AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY at build time.
This is not the best way to encode AWS access, but it is included as a simple way to get started with calling AWS.
The credentials must be set in the environment at build time, something like
AWS_ACCESS_KEY_ID=$DEVELOPER_KEY_ID \
AWS_SECRET_ACCESS_KEY=$DEVELOPER_SECRET_KEY \
cargo build --target wasm32-wasip2 --releaseIf your build environment does not have the variables set, the key and secret
will be UNSET. It is highly unlikely that this will work for calling AWS.
Examples:
Read from the normal environment variables
let credentials = build_environment_aws_credentials!();Read from foo_AWS_ACCESS_KEY_ID and foo_AWS_SECRET_ACCESS_KEY
let credentials = build_environment_aws_credentials!("foo_");