Closed lestephane closed 1 year ago
Hey @lestephane, thank you for reaching out. Usage of AWS_CONFIG_FILE or AWS to use a non standard location is currently not supported. Marking this as a feature request to align with AWS CLI(https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)
Before opening, please confirm:
How did you install the Amplify CLI?
npm install -g @aws-amplify/cli@latest
If applicable, what version of Node.js are you using?
v12.22.12
Amplify CLI Version
10.4.0
What operating system are you using?
Ubuntu 20.04.2 LTS
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Not applicable
Amplify Categories
Not applicable
Amplify Commands
init
Describe the bug
Using
aws-vault
throughcredential_process
in my non-standard located config file without a credentials file has been working for me in awscli v2 (and Intellij) for some time. So I expected it to be supported in Amplify CLI as well, especially since I exportAWS_SDK_LOAD_CONFIG=1
(see reproduction). But it doesn't.Expected behavior
I can't describe what to expect, since I never got past
amplify init
, it is the first time I use it, and I never ran it before. First contact, so to speak:I can tell you what I did not expect
Reproduction steps
1
.envrc
/tmp/config.awsvault
[profile scrubbed-primary-admin] source_profile=scrubbed-primary role_arn=arn:aws:iam::PRIMARYACCOUNTID:role/scrubbed-primary-admin-role mfa_serial=arn:aws:iam::PRIMARYACCOUNTID:mfa/scrubbed.primary.apiuser
[profile scrubbed-sandbox-admin] source_profile = scrubbed-primary-admin role_arn = arn:aws:iam::SANDBOXACCOUNTID:role/OrganizationAccountAccessRole
[profile awsvault-scrubbed-sandbox-admin] credential_process = aws-vault exec -j scrubbed-sandbox-admin
Project Identifier
No response
Log output
Additional information
My assessment is that AWS_CONFIG_FILE is not supported, even when AWS_SDK_LOAD_CONFIG=1. Further, because amplify does not have a --debug flag, it is difficult to figure out what the tool is doing without resorting to strace.