AWS::Lambda::Function Environment - AWS CloudFormation (original) (raw)

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.

If the value of the environment variable is a time or a duration, enclose the value in quotes.

Required: No

Type: Object of String

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

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

DeadLetterConfig

EphemeralStorage

Did this page help you? - Yes

Thanks for letting us know we're doing a good job!

If you've got a moment, please tell us what we did right so we can do more of it.

Did this page help you? - No

Thanks for letting us know this page needs work. We're sorry we let you down.

If you've got a moment, please tell us how we can make the documentation better.