- Le plus récent
- Le plus de votes
- La plupart des commentaires
This is normal behaviour.
If you name the profile to be default it will become default profile i.e. when no --profile param in the command.
More on default profile
If you spend more time using account1, you can make it the default by setting the AWS_DEFAULT_PROFILE environment variable. When the default environment variable is set, you do not need to specify the profile on each command.
Linux, OS X Example:
$ export AWS_DEFAULT_PROFILE=account1 $ aws dynamodb list-tables Windows Example:
$ set AWS_DEFAULT_PROFILE=account1 $ aws s3 ls
Other option is to set the AWS_profile environment variable at the command line via export AWS_PROFILE=profile_name. Setting the env variable changes the default profile until the end of your shell session or until you set the variable to a different value.
Thanks for your fast answer.
When I use the command set AWS_DEFAULT_PROFILE=account1
the account did not change.
Wether in the VSCode AWS Plugin nor in the status line. The result of the command aws s3 ls
are the ressources of the default account
I tried set AWS_PROFILE=profile_name
before and there nothing happens too.
In stackoverflow I saw a post where a user means the credentials must be unset and then set
unset AWS_ACCESS_KEY_ID
unset AWS_SECRET_ACCESS_KEY
export AWS_PROFILE=[profile-name-here]
But I don't understand where to do this. I am confused and deperate. :S
Close VS code and open again. Write
aws sts get-caller-identity
It should by default show your default profile creds. To change it export another profile.
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 3 mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 3 ans
- AWS OFFICIELA mis à jour il y a 2 ans