To create a custom configure profile in aws cli I am using the following command:
aws configure --profile user1
However, I cannot find any command to delete one of my profiles.
Hi you need a command or do you just need remove the profile?
You can edit the: Windows
C:\Users\USERNAME\.AWS\credentials
C:\Users\USERNAME\.AWS\config
(%USERPROFILE%\.aws\config
%USERPROFILE%\.aws\credentials)
or
Linux and macOS
~/.aws/config ~/.aws/credentials
~/.aws/config ~/.aws/config
If you were worried about do it many times, you can create a script with powershell or sed…
Get-Content test.txt) | ForEach-Object { $_ -replace "<profile>", "" } | Set-Content C:\Users\USERNAME.AWS\config
Or
sed -i 's/"[profile profile]//g' ~/.aws/config
Important: you need write the replace to all lines regarding your unless profile and I should do it too for your credentials file.