Where to put ebextensions config in AWS Elastic Beanstalk Docker deploy with dockerrun source bundle?

I am having trouble getting my docker elastic beanstalk deploy to read my .ebextensions/setup.config file.

The documentation for eb environment configuration says:

You can include one or more configuration files with your source bundle. Configuration files must be named with the extension .config (for example, myapp.config) and placed in an .ebextensions top-level directory in your source bundle.

However it looks like for Docker that the source bundle is not a .zip or .war file, but a .json file, e.g., the docs say to create a Dockerrun.aws.json file—and it looks like that is the source bundle?

In creating a version of the app I upload a custom Dockerrun-$VERSION.aws.json file to s3 and the run something like the following (where $APP is the versioned dockerrun json file):

aws elasticbeanstalk create-application-version \
    --application-name $APP_NAME \
    --version-label $VERSION \
    --source-bundle S3Bucket=$S3_BUCKET,S3Key=$S3_PATH/$APP

So… how is the .ebextensions directory going to be found in the top-level directory of the source bundle when the “bundle” is just a json file that ends up building a container? (My first attempt was to just put it in the root of the project, but that didn’t work.)

Answers


If you are using a .json file for docker deploys, then you cannot use .ebextensions.

You can however create a zip that contains your .json and your .ebextension directory and everything should work. Use the zip as your deployment artifact instead of the raw json.


Need Your Help

SQLException: executeQuery method can not be used for update

java mysql sql servlets

I am trying to insert user information taken from a registration form into Derby DB using a java servlet class.

Node JS NPM modules installed but command not recognized

node.js npm bower

Node JS and NPM was working well before. Recently I have re-installed the Node JS, NPM and the problem started. After I install a module like example npm install -g bower, the module gets installed