If you are having issues with a double or multiple AWS CLI configuration, you can follow these steps to avoid the issues :
Check if you have multiple AWS CLI configurations by running the command
aws configure list
This command will list all the available configurations on your system.
If you have multiple configurations, you can either remove the unwanted configuration or set the default configuration to the one you want to use. To remove a configuration, run the command
aws configure --profile profile_name delete
Replace
profile_name
with the name of the profile that you want to delete.To set the default configuration to a specific profile, run this command
export AWS_PROFILE=profile_name
Replace
profile_name
with the name of the profile that you want to set as the default.If you want to use a specific configuration for a command, you can specify the profile using the
--profile
option. For example, if you want to use the profile named "test" to list all the S3 buckets, you can run the commandaws s3 ls --profile test
By following these steps, you can avoid issues with a double AWS CLI configuration and ensure that you are using the correct configuration for your commands.