Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a .config file on Elastic Beanstalk?

I'm trying to run a custom .config file on my elastic beanstalk. I'm following the directions on this link. I've created a file called myapp.config, and put the following in 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:

"commands" in configuration file .ebextensions/myapp.config in application version myapp-0.0.33-SNAPSHOT must be a map. Update "commands" in the configuration file.

This error is really cryptic. What am I doing wrong?

My container is apache tomcat 7.

like image 258
Ali Avatar asked Apr 18 '14 06:04

Ali


People also ask

Where is Elastic Beanstalk config file?

Saved configurations are stored in the Elastic Beanstalk S3 bucket in a folder named after your application. For example, configurations for an application named my-app in the us-west-2 region for account number 123456789012 can be found at s3://elasticbeanstalk-us-west-2-123456789012/resources/templates/my-app .

What format can source files be in for Amazon Elastic Beanstalk?

Your source bundle must meet the following requirements: Consist of a single ZIP file or WAR file (you can include multiple WAR files inside your ZIP file) Not exceed 512 MB. Not include a parent folder or top-level directory (subdirectories are fine)


1 Answers

Got the answer. Apparently whitespace is important. I changed:

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

to:

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

and now it works.

like image 52
Ali Avatar answered Sep 22 '22 15:09

Ali