Running a .config file on an elastic beanstalk?

I am trying to run my own .config file on my elastic beanstalk. I follow the instructions on this link . I created a file called myapp.config and put the following into it:

 container_commands: 01_setup_apache: command: "cp .ebextensions/enable_mod_deflate.conf /etc/httpd/conf.d/enable_mod_deflate.conf" 

When I run this, I get the following error:

The "commands" in the configuration file .ebextensions / myapp.config in the application version myapp-0.0.33-SNAPSHOT should be a map. Update the β€œcommands” in the configuration file.

This mistake is really mysterious. What am I doing wrong?

My container is apache tomcat 7.

+7
yaml amazon-web-services elastic-beanstalk
source share
2 answers

Got an answer. Apparently, spaces are important. I changed:

 container_commands: 01_setup_apache: command: "cp .ebextensions/enable_mod_deflate.conf /etc/httpd/conf.d/enable_mod_deflate.conf" 

in

 container_commands: 01_setup_apache: command: "cp .ebextensions/enable_mod_deflate.conf /etc/httpd/conf.d/enable_mod_deflate.conf" 

and now it works.

+14
source share

The configuration file formats can be either yaml or json . Your initial configuration was from the barley style, but did not match. This is why fixing a space (which makes it compatible with yaml) fixed your configuration. If you write your config in yaml, you can run it through the yaml parser to check if it is compatible.

0
source share

All Articles