Staging for config file not working

amazon-alexa

#1

I’ve added a config.dev.js and config.prod.js as well as STAGE=dev in my .env file.

The difference between the two is they should write to different DynamoDB tables. However, when I build and deploy my app it’s still is writing to the production table.

Any help is greatly appreciated!


#2

Have you tried setting the environment variables in the Lambda console (not in the .env file)?

Learn more here: https://docs.aws.amazon.com/lambda/latest/dg/env_variables.html


#3

Yes but that didn’t seem to change anything. I’m following this tutorial: https://www.jovo.tech/docs/config-js#staging


#4

Thanks. For further debugging, could you send the relevant parts of your config files + a screenshot of how you’re setting the env variable on Lambda?


#5

Sorry for that Jan, it seems I had simply misunderstood and your first answer was correct.


#6

Good to know! Closing this then


closed #7