Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eb tools with multiple aws accounts

Is it possible to use Elastic Beanstalk Tools with two separate aws accounts in the same machine?

More description:

After installing elastic beanstalk tools as described here, I am able to initialize the setup in my project using

eb init

and supplying the aws id and secret. Everything is fine at this point. The issue here is that the credentials are automatically stored in ~/.aws/config and are read whenever the eb command is executed.

I have a second AWS account and would like to use eb tools there as well. Is it possible to make eb tools use a custom config file? I couldn't find anything in the documentation here

Thank you.

like image 554
Rorchackh Avatar asked Jul 23 '15 09:07

Rorchackh


People also ask

Which AWS service allows you to manage multiple AWS accounts?

AWS Organizations provides you with the ability to centrally manage your environment across multiple accounts.

Can a user be associated with multiple AWS accounts?

Two separate AWS accounts that you can use, one to represent the Development account, and one to represent the Production account. Both users can sign in and use the AWS Management Console in the Development account. You do not need any users or user groups created in the Production account.

Which tool can be used to automate the creation and management of multiple account AWS environments?

AWS Control Tower is an AWS managed service that automates the creation of a well-architected multi-account AWS environment.


1 Answers

Yes, you can do multiple profiles using EB tools.

To create a new profile, you can use

aws configure --profile <your-profile-name>

It will generate a new profile inside ~/.aws/credentials and ~/.aws/config. Or, you can edit those file manually. Please read the documentation here.

After you generate the profile, you can append --profile <your-profile-name> to your eb init command:

eb init --profile <your-profile-name>

It will generate a config file (.elasticbeanstalk/config.yml). After that, if you want to deploy, just use:

eb deploy
like image 87
Edward Samuel Avatar answered Oct 14 '22 09:10

Edward Samuel