Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nodejs process.env variables not working in aws lambda

Created a nodejs lambda function locally and integrated dotenv, so that env variables are accessed using process.env method. It is working. While deploying the same lambda and when tested inside aws console, it is returning undefined for env variable. Any idea why it so.

like image 678
roby.elan Avatar asked Jun 13 '26 12:06

roby.elan


1 Answers

Download your deployment zip file from S3 and make sure it has the .env file.

like image 141
mostafazh Avatar answered Jun 15 '26 07:06

mostafazh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!