Is it posssible to reference the PARAM1 / PARAM2 etc.. container environment properties from the .ebextensions config files. If so, how? I tried $PARAM1 but it seemed to be an empty value.
I want to set the hostname on startup to contain DEV, QA or PROD, which I pass to my container via the PARAM1 environment variable.
commands:
01-set-correct-hostname:
command: hostname myappname{$PARAM1}.com
It turns out you can only do this in the container_commands
section, not the commands
section.
This works:
container_commands:
01-set-correct-hostname:
command: "hostname myappname{$PARAM1}.com"
See http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-container_commands for more details.