AWS Lambda Environment Variable


#1

When I add an environment variable to a aws-lambda through the aws-lambda console, I am able to reference these variables using:

import os

print("environment variable: " + os.environ[‘variable’])

How might I use an environment variable in aws-lambda within a cloudformation template?
I don’t want to declare the environment variable in the aws-lambda console.