I've recently switched from old AWS EB CLI tools (2.6.4) to the current ones (3.0.10) and am wondering how to ensure that my project's configuration is migrated, and what configuration files I should keep.
I've run (the new version of) eb init
and now have, in my project's .elasticbeanstalk
directory, a new file
config.yml
along with several ones that were there before
config
optionsettings.sitetest-develop-env
optionsettings.sitetest-env
which of these are still needed; which can I delete; and what steps to I need to take to ensure that all of the old settings have been migrated to (and to the right place for) the 3.x AWS EB CLI tools?
I used the latest version (3.x) directly and didn't realise the difference between eb 2.6.x and EB CLI 3.x at beginning. Thanks to raise this question (+1) .
Here is what I got from AWS Elastic Beanstalk documents.
Old version is called eb 2.6.x
, new version is called EB CLI 3.x
, the configuration difference between these versions has been explained clearly by this url
EB Command Line Interface
- EB is a command line interface (CLI) for AWS Elastic Beanstalk that you can use to deploy applications quickly and more easily. AWS Elastic Beanstalk supports eb 2.6.x and EB CLI 3.x. You can use EB CLI 3.x to manage environments that you launched using eb 2.6.x or earlier versions of eb. EB CLI will automatically retrieve settings from an environment created using eb if the environment is running. Unlike eb, EB CLI does not store option settings locally.
Why you have these folder/files (such as config, optionsettings.sitetest-develop-env, optionsettings.sitetest-envin) in your environment, here is the explanation Eb Operations, that's only for eb 2.6.x
- You can use a configuration file in an .ebextensions/.conf* directory to configure some of the same settings that are in an .elasticbeanstalk/optionsettings file. However, the values for the settings in .elasticbeanstalk/optionsettings will take precedence over anything in .ebextensions/*.conf if the settings are configured in both. Additionally, any option setting that is specified using the API, including through eb, cannot later be changed in an environment using .ebextensions configuration files.
Finally, answer your question. If you have upgraded the version to EB CLI 3.x, then you can clean these files, but you still need keep config.yml
, it is created when eb init
in EB CLI 3.x.
@BMW's answer is very clear and good, but I thought I would provide a more condensed version.
The only file the EB CLI 3.x needs is the config.yml in the .elasticbeanstalk folder
While 3.x will attempt to read your 2.x configurations and port them over, it is not needed. 3.x will also pull down settings from any running environments. Therefore the cleanest way to upgrade to 3.x is to create a new directory and use EB init. It will sync with your existing application and environment(s).