How do I go about creating Elastic Beanstalk confi

2019-09-08 19:01发布

问题:

I am looking for advice about how I should approach the problem of creating Elastic Beanstalk configuration files.

  1. How do I go about constructing an Elastic Beanstalk configuration files?
  2. How do I know what to include or not include?
  3. Do I construct it by hand using the template reference or are they typically generated by a configuration tool?

回答1:

You can modify the configuration of Elastic Beanstalk environments in multiple ways. One way is to place a folder with the name .ebextensions inside your app source zip. Inside this folder you can have one or more files with a .config extension. Files will be processed in the alphabetical order of their name. These files are formatted using YAML syntax. These files allow you to control lots of configuration options for your beanstalk environments.

This page explains various things you can configure using ebextensions (assuming you are on a linux environment). You can read about ebextensions on Windows here. On this page you will find information on how different parts of your environment configuration can be controlled, e.g. you can install packages on your instances, you can create files, you can run shell commands on your instances during deployment, you can control settings of your environment etc.

You can also control option_settings for your environment using these config files. You can read more details about what option settings are supported here.

You can also modify properties of AWS resources like load balancer, auto scaling groups etc. created by beanstalk or you can create new resources like DynamoDB tables using ebextensions. Documentation on how to create or modify resources is available here.