$ aws configure --profile mycoolproject
$ aws configure list --profile mycoolproject
Name Value Type Location
---- ----- ---- --------
profile mycoolproject manual --profile
access_key ****************FAKE shared-credentials-file
secret_key ****************FAKE shared-credentials-file
region eu-west-1 config-file ~/.aws/config
To use a named profile, add the
--profile yourprofilename
option to your command. The following example lists all of your Amazon EC2 instances using the credentials and settings defined in themycoolproject
profile.To use a named profile for multiple commands, you can avoid specifying the profile in every command by setting the
AWS_PROFILE
environment variable at the command line.$ export AWS_PROFILE=mycoolproject
Setting the environment variable changes the default profile until the end of your shell session, or until you set the variable to a different value. (You can make environment variables persistent across future sessions by putting them in your shell's startup script.)