Here is an excerpt of my EB configuration file .ebextensions/app.config
:
option_settings:
- option_name: AWS_SECRET_KEY
value: xxxxxxxxxx
- option_name: AWS_ACCESS_KEY_ID
value: xxxxxxxxxx
- option_name: APP_ENV
value: development
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: ProxyServer
value: nginx
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: GzipCompression
value: true
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: NodeVersion
value: 0.8.10
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: NodeCommand
value: npm start
commands:
test_command:
command: echo $APPLICATION_ENV > /home/ec2-user/test.txt
cwd: /home/ec2-user
ignoreErrors: true
then I do the normal thing:
$ git commit -am "wrote config file"
$ eb init
...
$ eb start
...
would you like to use the most recent commit [y/n]
$ y
Then after deploy is complete and in green state, looking inside the eb
generated .elasticbeansalk/optionsettings.myapp-env
file I found:
[aws:elasticbeanstalk:application:environment]
PARAM1=
PARAM2=
PARAM3=
PARAM4=
PARAM5=
[aws:elasticbeanstalk:container:nodejs]
GzipCompression=false
NodeCommand=
NodeVersion=0.8.24
ProxyServer=nginx
My environment variable was not set, the NodeCommand
directive was not set, and the NodeVersion
has been ignored. What gives, EB? How can it ignore certain directives and not others? Any ideas on what I'm doing wrong?
EDIT
according to this post, the JSON holding the environment variables is held here:
/opt/elasticbeanstalk/deploy/configuration/containerconfiguration
which means I can parse this fiel for the variables, but this is frustrating since it's supposed to be taken care of with the configuration file (otherwise why have one?). There still must be an issue with my configuration file, otherwise EB seems completely broken in this respect...