I'm try to describe my situation:
Have multiple AWS account, credentials is located under ~/.aws/credential
To swich to other account I'm typing:
eb init -i --profile name
Now to deploy code to accounts I must every time switch to other acc. How I can organize .ebextensions
to have possibility to deploy to 10 AWS acc without switching between profiles ?
You don't need to do
eb init
every time. You can deploy with arguments,eb deploy --profile profile_name
.If you setup your .elasticbeanstalk/config file something like this you can have different profiles and branches for different environments without using arguments.
I haven't tried this, but if you call
eb deploy environment_name --profile eb-profile3
that is linked to somewhere else it should deploy there with your branch and global specific settings (profile overriden).eb deploy <environment name>
overrides the environment name. http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-deploy.htmlI have only read this briefly, but maybe this can help you as well. http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebcli-compose.html