In .ebextensions/options.config it is the AWS_REGION environment variable that is set, but in app.js, the code refers to the REGION environment variable to set AWS.config.region. Inspection of running system on launched EB environment shows that indeed REGION is actually not set.
Although the code still appears to work, I believe that the intention was to say AWS.config.region = process.env.AWS_REGION instead (otherwise AWS_REGION is not used anywhere). I'm a bit puzzled as to why the code still works when AWS.config.region is set to undefined (especially after one switches to use nodejs-tutorial for table name). How does the running process know to use the correct region in this case?
In
.ebextensions/options.configit is theAWS_REGIONenvironment variable that is set, but inapp.js, the code refers to theREGIONenvironment variable to setAWS.config.region. Inspection of running system on launched EB environment shows that indeedREGIONis actually not set.Although the code still appears to work, I believe that the intention was to say
AWS.config.region = process.env.AWS_REGIONinstead (otherwiseAWS_REGIONis not used anywhere). I'm a bit puzzled as to why the code still works whenAWS.config.regionis set to undefined (especially after one switches to usenodejs-tutorialfor table name). How does the running process know to use the correct region in this case?