I'm quite new to programming in AWS so I will do my best to explain my problem as thoroughly as possible.
My goal is to store an API (private) key as an environment variable on Elastic Beanstalk, for security purposes. My stack is NodeJS + Express + VueJS
Local setup
Locally I've created a .env.local file in the root folder with a VUE_APP_TEST=Test is working locally parameter. The VUE_APP_ part is needed as I want to call on this parameter from my vue app.
After running a build, I can call my parameter with NodeJS using the following code:
var testparam = process.env.VUE_APP_TEST || "Test is not working"
Which makes testparam equal to "Test is working locally" in string format.
So far, so good!
Elastic Beanstalk setup
Following this information from AWS's docs (under Configuring environment properties) I set the same variable as follows: aws environment variable declaration. As explained in the AWS docs, the code for running the parameter is the same:
var testparam = process.env.VUE_APP_TEST || "Test is not working"
Only this time I expect the result to be "Test is working on aws". However, the same "Test is working locally" appears.
I cannot get it to work and it looks to me like a really trivial problem. Can anyone help me? I've spent an entire day on this. Thank you in advance!