节点server.js不会从弹性beanstalk获得envvariables

我尝试使用AWS Elastic Beanstalk上的AWS CodeBuild启动一个node.js项目。 我把我的envvariables放在Software Configuration下的Elastic Beanstalk Configuration中。 之后,我将项目部署到Elastic Beanstalk,而我的server.js没有envvariables。

我在server.js的顶部实现了一个console.log(process.env),但是没有我在Elastic Beanstalkconfiguration中填充的envvariables。 我访问了Elastic Beanstalk日志。

另外我的日志告诉我这个:

Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED 127.0.0.1:6379 at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14) npm ERR! Linux 4.9.43-17.39.amzn1.x86_64 npm ERR! argv "/opt/elasticbeanstalk/node-install/node-v6.11.1-linux- x64/bin/node" "/opt/elasticbeanstalk/node-install/node-v6.11.1-linux- x64/bin/npm" "run" "start" npm ERR! node v6.11.1 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! xxxxxxx start: `NODE_ENV=production node server` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the xxxxxxx start script 'NODE_ENV=production node server'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the xxxxxxx package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! NODE_ENV=production node server npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs xxxxxxx npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls mapify-ssr npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /var/app/current/npm-debug.log