Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS - Elastic Beanstalk CLI - how to list/change profiles

I have two AWS accounts, one for personal, one for work-related projects. I've previously created and deployed to my personal AWS account.

I want to create a work-related app on the work AWS account. I signed in with those credentials, and created a new application from within the console.

Then, in my work project folder, I eb init and eb create/deploy the work app. When I did eb create, it was asking to set up a an environment different than the one I had created in AWS. After creating it, I found that a new project had be created within my personal AWS account.

I was told I have to change profiles doing eb --profile but am not sure of my profile names. How can I list and change my profile from my personal to my work profile?


EDIT:

I was given an access key ID. I tried eb --profile MYKEYID. No message was displayed when I did this. I'm not sure which profile I'm on.

like image 863
user3871 Avatar asked Jul 29 '15 02:07

user3871


1 Answers

The EB CLI and the AWS CLI share the same credentials. They are stored in either ~/.aws/config or ~/.aws/credentials.

You can list them using

aws configure list

Once you know what 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 what settings the EB CLI has for your project by looking at the .elasticbeanstalk/config.yml file.

like image 91
Nick Humrich Avatar answered Sep 24 '22 16:09

Nick Humrich