If I use a profile name that doesn't exist in my ~/.aws/config file (note I do not have a ~/.aws/credentials file), aws-vault does not error and gives me credentials. Here is an example (I hid the actual AWS credentials via the grep but they are indeed set on the shell):
Expected behavior:
I would expect aws-vault to error (return non-zero code to the shell) along with a useful error message since I provided an invalid profile name. This expected behavior is similar to what AWS CLI does. For example, the AWS CLI provides a useful error message when given an invalid profile as follows:
❯ AWS_PROFILE=invalid-profile-name aws s3 ls
The config profile (invalid-profile-name) could not be found
If I use a profile name that doesn't exist in my
~/.aws/config
file (note I do not have a ~/.aws/credentials file), aws-vault does not error and gives me credentials. Here is an example (I hid the actual AWS credentials via the grep but they are indeed set on the shell):Expected behavior: I would expect aws-vault to error (return non-zero code to the shell) along with a useful error message since I provided an invalid profile name. This expected behavior is similar to what AWS CLI does. For example, the AWS CLI provides a useful error message when given an invalid profile as follows: