AWS - Elastic Beanstalk CLI - how to list / modify profiles
I have two AWS accounts, one for personal, one for work related projects. I have previously created and deployed my personal AWS account.
I want to create an application to run on a production AWS account. I signed in with these credentials and created a new app from the console.
Then in my project working folder I am eb init
and eb create
/ is deploy
running application. When I did eb create
, it was asking to create a different environment than the one I created in AWS. After creating it, I found that the new project was created in my personal AWS account.
I was told that I need to change profiles by doing eb --profile
, but I am not sure about the names of my profiles. How can I list and change my profile from my personal to my work profile?
EDIT:
I was assigned a passkey ID. I tried it eb --profile MYKEYID
. When I did this, the message was not showing. I'm not sure which profile I am on.
source to share
CL CLI and CLI AWS have the same credentials. They are stored in ~/.aws/config
either or ~/.aws/credentials
.
You can list them with
aws configure list
Once you know which profile you want to use, you can set it permanently for that project by running
eb init --profile ProfileName
in the project directory.
You can see which EB CLI settings for your project are being viewed in the file .elasticbeanstalk/config.yml
.
source to share