This is something to think about: our CLI is loading env variable values from .env.json files (root, api folder, etc). but those values overwrite the ones already defined in the process.env. We need to evaluate this and think about how this will work in a CI environment, where we don't want to overwrite existing values.
Maybe completely removing AWS_* variables from all .env.json files is the right way to go?
@SvenAlHamad @doitadrian
I think this makes more sense but I'm working from the perspective of AWS only. I wonder how multi-cloud impacts any work that might need to go into this?
That wouldn't affect anything. Actually, you can even go into your .env.json and remove all AWS_* definitions (with current state of things). That will then use everything that is already in process.env.
I'm on board for this. Leave it up to the user for credentials.
Less work overall to manage and it's already common practice to manage credentials/auth using existing (well established) AWS practices.
I just spent a bunch of time debugging this. The configuration was broken out of the box. The documentation and links on step 4 of the quickstart(https://docs.webiny.com/docs/get-started/quick-start/) are confusing as they point to a serverless page that is not relevent(since the serverless.yml is not pressent) and explicity state that AWS_PROFILE environment variable is not used ( which is false). The only way I was able to get this to work was removing all the AWS_* from the root .env.json and set the AWS_PROFILE in the environment.
Hey @cianx, AWS environment variables are set via the <project-root>/.env.json.
serverless.yml is located in the api folder and the apps folder. Since those are 2 distinct infrastructure stacks, each needs a separate config file.
Thanks for joining this discussion, it confirms that this IS an issue and is confusing to the users.
Our next release is almost ready and we'll address this issue as part of the release.
Thanks! 馃殌
Most helpful comment
That wouldn't affect anything. Actually, you can even go into your
.env.jsonand remove allAWS_*definitions (with current state of things). That will then use everything that is already inprocess.env.