AWS::Lambda::Function Environment - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::Lambda::Function Environment

A function's environment variable settings. You can use environment variables to adjust your function's behavior without updating code. An environment variable is a pair of strings that are stored in a function's version-specific configuration.


To declare this entity in your Amazon CloudFormation template, use the following syntax:


{ "Variables" : {Key: Value, ...} }


Variables: Key: Value



Environment variable key-value pairs. For more information, see Using Lambda environment variables.

Required: No

Type: Object of String

Pattern: [a-zA-Z][a-zA-Z0-9_]+

Update requires: No interruption


Environment Variables

Add environment variables to a function. Each variable is a key-value pair. This example specifies values for a databaseName and a databaseUser.


Environment: Variables: databaseName: lambdadb databaseUser: admin