Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

eb setenv

Focus mode
eb setenv - AWS Elastic Beanstalk

Description

Sets environment properties for the default environment.

Syntax

eb setenv key=value

You can include as many properties as you want, but the total size of all properties cannot exceed 4096 bytes. You can delete a variable by leaving the value blank. See Configuring environment properties (environment variables) for limits.

Note

If the value contains a special character, you must escape that character by preceding it with a \ character.

Options

Name

Description

--timeout

The number of minutes before the command times out.

Common options

Output

If successful, the command displays that the environment update succeeded.

Example

The following example sets the environment variable ExampleVar.

$ eb setenv ExampleVar=ExampleValue 2018-07-11 21:05:25 INFO: Environment update is starting. 2018-07-11 21:05:29 INFO: Updating environment tmp-dev's configuration settings. 2018-07-11 21:06:50 INFO: Successfully deployed new configuration to environment. 2018-07-11 21:06:51 INFO: Environment update completed successfully.

The following command sets multiple environment properties. It adds the environment property named foo and sets its value to bar, changes the value of the JDBC_CONNECTION_STRING property, and deletes the PARAM4 and PARAM5 properties.

$ eb setenv foo=bar JDBC_CONNECTION_STRING=hello PARAM4= PARAM5=

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.