7

I have two aws accounts : production and staging. I'm using aws-cli v3 to deploy via GIT to my production environment using eb deploy

I want to be able to deploy to my staging environment regularly from my develop branch and when it comes to deploying a release I want to be able to deploy from my newly created release branch to my production environment.

I already have my ~/.aws/config file with my two account key sets (staging and production), and would like to be able to do something like:

eb deploy --profile staging

and

eb deploy --profile production

Is it necessary to have the two environments under the same account and use eb use production-env and eb use staging-env?

Anthony Neace
  • 25,013
  • 7
  • 114
  • 129
Mark Kenny
  • 1,598
  • 2
  • 17
  • 30
  • did you found answer for this question ? I have same problem, if you have answer please answer your question. Thank you. – Wizard May 10 '16 at 20:02
  • I just cloned my GIT repo down as another local copy as `my_app_staging`. That way I could use `eb init` to have a separate aws config (stored locally) using the keys for my staging account. Any time I want to deploy to staging I cd to this directory and pull the remote repo and `eb deploy` from there. – Mark Kenny May 11 '16 at 09:49
  • is not solution to deploy to ~10 app ... – Wizard May 11 '16 at 14:22

1 Answers1

1

A similar question has already been answered here

Also it does look like the eb command does support profiles

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-cmd-commands.html http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-cmd-commands.html#eb3-cmd-options

Community
  • 1
  • 1
strongjz
  • 4,271
  • 1
  • 17
  • 27