AWS Elastic Beanstalk difference between env.yml VS .config

Viewed 612

I'm making some tests with the AWS Elastic Beanstalk platform for the first time to discover it. But i'm facing an issue :

The documentation show us that we can describe the environment configuration inside a ".ebextensions/myConf.config" file.

But i also discover that we can describe the environment configuration inside a "env.yml" in the root project (including more options like "Platform").

The question is, what is the difference between the two files ? Should i use both ? In which case ?

Thanks in advance,

1 Answers

The two settings choices are complementary, although there is some overlap between env.yaml and .ebextentions.

For example, things like CName, EnvironmentName or SolutionStack can only be set in env.yaml. So instead of setting up their values in EB console or CLI, you could define them in env.yaml to ensure reproducible deployments of your EB. Thus, env.yaml can be considered are more specific to EB environment itself, not to your application.

In contrast, .ebextentions contains configuration scripts that are more coupled with details of your application. What commands should your run to bootstrap it, what config files should you setup or modify it.

Should i use both ? In which case ?

Generally I see .ebextentions used much more often than env.yaml. Thus, to begin your EB journey I would recommend just focusing on .ebextentions.

There are many more possibilities of setting up EB than only .ebextentions or env.yaml. There are also .platform, deployment hooks, Buildfile, Procfile, saved configurations and probably some other things I can't remember.

Related