I'm trying to SSH to my EB instance but
eb ssh
eb ssh --setup
Both gives me
ERROR: InvalidProfileError - The config profile (default) could not be found
I did check $HOME/.aws/config which was generate through eb-cli and it does seem to be in the right place with correctly generated credential.
[profile eb-cli]
aws_access_key_id = correctkeyid
aws_secret_access_key = correctaccesskey
I copied config file and threw it in [project]/.aws just to see if it does anything but still the same error as expected.
The eb ssh
cli tool is attempting to read back AWS profile entries for a default
AWS profile (typically from ~/.aws/config
and ~/.aws/credentials
files), but the profile contained in these files is a named profile – named as eb-cli
, from the line [profile eb-cli]
.
Option 1) In the project, edit the .elasticbeanstalk/config.yml
file
profile: default
profile: eb-cli
Option 2) Edit the bracketed names in the those ~/.aws/*
files to align with the profile name declared in the config.yml
file.
Or update all of these entries to something more meaningful to the project, such as my-project
. Once these profile names align, you'll be able to connect with eb ssh
.
Note that the ~/.aws/*
configuration files support multiple named profile entries, which enables having multiple projects linked to differently named AWS profiles.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With