AWS Lambda Environment Variable

Lianamelissa
New Member Posts: 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 would 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.
Thanks