Posts

Showing posts with the label cloud9-ide

Cloud9 does not expose bash_profile exports in nodejs lambda

Cloud9 does not expose bash_profile exports in nodejs lambda I have a Cloud9 environment spun up and have modified my ~/.bash_profile to export a value at the end of the file. export foo="hello world" export foo="hello world" I run . ~/.bash_profile and then echo $foo and I see hello world output in the terminal. . ~/.bash_profile echo $foo hello world I then created a NodeJS Lambda with API Gateway. I run the API Gateway locally in Cloud 9 and attempt to read the environment variables console.log(process.env) console.log(process.env) I see a list of variables available to me that AWS has defined. My export is not listed there however. Since I will be using environment variables when my Lambda is deployed, I want to test it with environment variables defined in the Cloud9 environment. Is there something specific I have to do in order to get the Lambda to read my .bash_profile exports? 1 Answer 1 ...