Cannot deploy / environment & region

Hi,
wanted to take the first steps but cannot deploy api. checked 4x but don’t see where I went wrong.
My output:
yarn webiny deploy api --env=local
yarn run v1.22.10
$ /Users/michaelsteindl/ichabod/ichabod/node_modules/.bin/webiny deploy api --env=local
This is the first deploy of local environment, so it may take a few minutes.
:bulb: No environments were found in /.env.json. Skipping.
:bulb: Loaded local environment from /api/.env.json.
:rotating_light: Layer webiny-v4-sharp is not available in undefined region.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

My /.env.json
{
“default”: {
“AWS_PROFILE”: “webiny”,
“AWS_REGION”: “us-east-1”
“MONGODB_SERVER”:“mongodb+srv://xx:[email protected]”,
“MONGODB_NAME”: “Ichabod”,
“DEBUG”: true
},
“local”: {
“MONGODB_SERVER”: “mongodb+srv://xx:[email protected]”,
“MONGODB_NAME”: “Ichabod”
},
“dev”: {
“MONGODB_SERVER”: “[MONGODB_SERVER]”,
“MONGODB_NAME”: “ichabod-dev”
},
“prod”: {
“MONGODB_SERVER”: “[MONGODB_SERVER]”,
“MONGODB_NAME”: “ichabod-prod”
}
}

Seems like you didn’t create the webiny profile on your aws credentials.
It’s better if you could just use the default profile (new profile name didn’t work for me too).

For example, on windows, the profiles are saved on Users/username/.aws/credentials file. The content of it should be similar to:

[default]
aws_access_key_id=******************
aws_secret_access_key=************************

Thank you for the response!
I did not mention, the file exists and I also tried the “default”.

What puzzles me is the message “No environments were found in /.env.json. Skipping.”

1 Like