Support aws config file
I have a ~/.aws/config file like this;
[profile default]
sso_start_url = https://example.com/start
sso_region = ap-southeast-2
sso_account_id = 123456789
sso_role_name = developer-access
region = ap-southeast-2
output = json
[profile app-test]
....
[profile app-staging]
....
Setting a profile in config like s3.profile = 'app-staging' does not seem to work, errors during s3 upload
AWS_SDK_LOAD_CONFIG=1 ember deploy staging
- CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
at SharedIniFileCredentials.load (/home/boverton/Blake/teacher-ui-client/node_modules/.pnpm/[email protected]/node_modules/aws-sdk/lib/credentials/shared_ini_file_credentials.js:146:11)
(removing AWS_SDK_LOAD_CONFIG=1 does not help)
However, running the deploy like this does work (only if s3.profile is removed from config);
AWS_PROFILE="app-staging" AWS_SDK_LOAD_CONFIG=1 ember deploy staging
My question is... am I doing something wrong? Is this something that will/should end up working as part of the aws sdk v3 update over here https://github.com/ember-cli-deploy/ember-cli-deploy-s3/issues/173 ?
Would also be nice if s3.region wouldn't need to be set if it's found in that aws config file, but I'm less bothered about that one
I agree it would be ideal for an aws config file to work as expected and am open to PRs that address this.
I can confirm this is fixed in v5.0.0-beta.0
I am able to set s3.profile = 'app-staging' in the deploy config without specifying AWS_SDK_LOAD_CONFIG or AWS_PROFILE via the command
Would also be nice if s3.region wouldn't need to be set if it's found in that aws config file, but I'm less bothered about that one
This is still present, but like I said not bothered about that one - I can specify it in the deploy config file just fine, it just duplicates what's already in the aws config file
thanks a bunch!