I have the following config file:
packages:
yum:
at: []
01_remove_old_cron_jobs:
command: "sudo cp enable_mod_pagespeed.conf /etc/httpd/conf.d"
02_remove_old_cron_jobs:
command: "sudo rpm -U -iv --replacepkgs mod-pagespeed.rpm"
03_remove_old_cron_jobs:
command: "sudo touch /var/cache/mod_pagespeed/cache.flush"
Labeled 01.config
. When I deploy this to my server, I get an error such as:
Error processing file (Skipping): '.ebextensions/01.config' - Contains invalid key: '02_remove_old_cron_jobs'. For information about valid keys, see http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html
However, the documentation contains no information about valid keys, and this key looks similar to my other keys.
The configuration files keys are specified in this page: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html
So, in your case, you have to write your commands inside a
commands
key. Your file will look like that:The complete syntax for commands you can find here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#linux-commands