AWS::Lambda::Function Environment - AWS CloudFormation

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.

Syntax

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

JSON

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

YAML

Variables: Key : Value

Properties

Variables

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

Required: No

Type: Map of String

Update requires: No interruption

Examples

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.

YAML

Environment: Variables: databaseName: lambdadb databaseUser: admin