I'm trying to set the `AWS_CONFIG_FILE` parameter ...
# sst
s
I'm trying to set the
AWS_CONFIG_FILE
parameter when running
sst start
so I can specify a location of an alternative
~/.aws/config
file
I tried to update my
package.json
as follows:
Copy code
"scripts": {
    "start": "AWS_CONFIG_FILE=/path/to/my/config AWS_PROFILE=staging AWS_SDK_LOAD_CONFIG=1 sst start --stage $(whoami)",
    "remove": "AWS_CONFIG_FILE=/path/to/my/config AWS_PROFILE=staging AWS_SDK_LOAD_CONFIG=1 sst remove --stage $(whoami)",
  }
However, this does not work. The AWS docs says the following about
AWS_CONFIG_FILE
You can't specify this value in a named profile setting or by using a command line parameter
I'm not clear about where I should define this environment variable?
A little background, I'm planning on committing a shared config file to source control. In doing so, I can ensure anyone in the organization that runs
yarn run start
will deploy to the same account
m
I think the
AWS_CONFIG_FILE
and
AWS_PROFILE
settings may be at odds with each other, with
AWS_PROFILE
taking precedence. In that shared config are you planning on having the
aws_access_key_id
and
aws_secret_access_key
stored? Because that is highly frowned upon, even in private repos.
would be better to just define
AWS_PROFILE
as something and then have users set that up locally with their own IAM creds (via
aws configure --profile YOUR_PROFILE_NAME
)
s
No sensitive data, just configuration for SSO (start url, region, account number) and each person deploying this app locally will have their own credentials file with their account secrets
In setting this up, I'm hoping to prevent the user from needing to ensure they have a specific profile configured (even though their account will grant them access)
m
ahh got it, SSO setup. Are you using
aws-sso-credentials
?
Every time I've had to deal with this it sufficed to just have the relevant setup in the README. It's a one-time action
s
Yeah, I think that's good advice
I'm trying to make a lower friction development experience for members of this team
but honestly, setting up your AWS CLI with SSO isn't really a lot of work