I have used aws-vault add production
to create a temporary credentials. Because there is no production named profile in .aws/credentials I decided to remove the credentials and configure a new one, with corrected name. For that I used aws-vault remove production
. That of course only deleted the credentials, but not the profile name shown in the aws-vault list
command output. Is there a way to delete that profile name?
Thanks in advance.
The profiles you see in
aws-vault list
correspond to profiles defined in your~/.aws/config
file. To remove a profile, edit~/.aws/config
and remove it. E.g., if I see:Then in
~/.aws/config
I will find:And if I remove the entry for
[profile testing]
, I no longer see it in the output ofaws-vault list
:Here's a complete walkthrough to make sure we're both seeing the same behavior.
I start with an empty credentials list:
I add
production
credentials:Which now appear in the list:
This creates a profile entry in
~/.aws/config
:If I remove those credentials:
The profile still shows up in the list even though the credentials have been deleted:
If I remove the
[profile production]
entry from~/.aws/config
:Then the profile no longer appears in the output of
aws-vault list
: