AWS Lambda Environment Variables

, ,

When setting up a lambda function there will most likely be secure information that you don’t want to put into your lambda functions. This is when you want to use environment variables. When declaring environment variables inside the code of your lambda function, add the string “process.env.varable_name” where “variable_name” is any string. Once you’ve declared all your environmental variables, go to your was lambda  function console, and scroll down to the environment variables section. Then add all your “variable_names” to the left side text boxes and on the right enter in the actual value of the variable. You can then, if needed, encrypt the environment variables by using the encryption configuration.