how to configure eb cli with eb env that is alread

2019-06-14 21:20发布

I have taken over a project that has been deployed to elastic beanstalk. I would like to configure my eb cli to deploy to the existing environment without modifying that environment. From my research I get the impression that eb init is the proper command, however when I started going through the interactive session it seemed like it was going to use my entries as the configuration settings (e.g. platform version). I want to make sure that I maintain the settings that are already in use (I was unable to determine what platform version my running environment is using) and I want to make sure that the running ec2 instance will not be replaced or terminated for any reason. Does anyone know the best way to go about doing this? Thanks in advance for any help.

2条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-06-14 22:11

During eb init make sure select an existing application and environment. As long as you do this it will pull down the settings from the environment.

However, that being said, the settings that eb init creates are default setting used for future environments. It will not overwrite any settings on any running environments.

As far as instances, Elastic Beanstalk can terminate or create instances at anytime based on health and autoscaling. However, if we assume your instances are healthy and no autoscaling events occur, then eb deploy will never cause instances to be replaced.

I am however a little curious as to why you are so worried about your instances being replaced.

As far as determining your current platform, you can get that information from eb status.

查看更多
神经病院院长
3楼-- · 2019-06-14 22:23

Better way is to configure you aws cli using aws configure or manually create -

~/.aws/config with

[profilename]
region = ap-south-1

~/.aws/credentials with

[profilename]
aws_secret_access_key = abc
aws_access_key_id = pqr

and then use -

eb init --profile profilename
查看更多
登录 后发表回答