AWS CloudFormation
User Guide (API Version 2010-05-15)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.

AWS::ElasticBeanstalk::Environment

Creates or updates an AWS Elastic Beanstalk environment.

Syntax

{
   "Type" : "AWS::ElasticBeanstalk::Environment",
   "Properties" : {
      "ApplicationName" : String,
      "CNAMEPrefix" : String,
      "Description" :  String,
      "EnvironmentName" :  String,
      "OptionSettings" : [ OptionSettings, ... ],
      "SolutionStackName" : String,
      "TemplateName" : String,
      "Tier" : Environment Tier,
      "VersionLabel" : String
   }
}
      

Properties

ApplicationName

The name of the application that is associated with this environment.

Required: Yes

Type: String

Update requires: Replacement

CNAMEPrefix

A prefix for your AWS Elastic Beanstalk environment URL.

Required: No

Type: String

Update requires: Replacement

Description

A description that helps you identify this environment.

Required: No

Type: String

Update requires: No interruption

EnvironmentName

A name for the AWS Elastic Beanstalk environment. If you don't specify a name, AWS CloudFormation generates a unique physical ID and uses that ID for the environment name. For more information, see Name Type.

Important

If you specify a name, you cannot do updates that require this resource to be replaced. You can still do updates to this resource if the update requires no or some interruption.

Required: No

Type: String

Update requires: Replacement

OptionSettings

Key-value pairs defining configuration options for this environment. These options override the values that are defined in the solution stack or the configuration template. If you remove any options during a stack update, the removed options revert to default values.

Required: No

Type: A list of OptionSettings.

Update requires: Some interruptions

SolutionStackName

The name of an AWS Elastic Beanstalk solution stack that this configuration will use. For more information, see Supported Platforms in the AWS Elastic Beanstalk Developer Guide. You must specify either this parameter or an AWS Elastic Beanstalk configuration template name.

Required: No

Type: String

Update requires: Replacement

TemplateName

The name of the AWS Elastic Beanstalk configuration template to use with the environment. You must specify either this parameter or a solution stack name.

Required: No

Type: String

Update requires: Some interruptions

Tier

Specifies the tier to use in creating this environment. The environment tier that you choose determines whether AWS Elastic Beanstalk provisions resources to support a web application that handles HTTP(S) requests or a web application that handles background-processing tasks.

Required: No

Type: AWS Elastic Beanstalk Environment Tier Property Type

Update requires: See AWS Elastic Beanstalk Environment Tier Property Type

VersionLabel

The version to associate with the environment.

Required: No

Type: String

Update requires: Some interruptions

Return Values

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, it returns the resource name.

For more information about using the Ref function, see Ref.

Fn::GetAtt

Fn::GetAtt returns a value for a specified attribute of this type. This section lists the available attributes and corresponding return values.

EndpointURL

The URL to the load balancer for this environment.

Example:

awseb-myst-myen-132MQC4KRLAMD-1371280482.us-east-1.elb.amazonaws.com

For more information about using Fn:GetAtt, see Fn::GetAtt.

Examples

Simple Environment

{
   "Type" : "AWS::ElasticBeanstalk::Environment",
   "Properties" : {
      "ApplicationName" : { "Ref" : "sampleApplication" },
      "Description" :  "AWS Elastic Beanstalk Environment running PHP Sample Application",
      "EnvironmentName" :  "SamplePHPEnvironment",
      "TemplateName" : "DefaultConfiguration",
      "VersionLabel" : "Initial Version"
   }
}        

Environment with Embedded Option Settings

{
   "Type" : "AWS::ElasticBeanstalk::Environment",
   "Properties" : {
      "ApplicationName" : { "Ref" : "sampleApplication" },
      "Description" :  "AWS Elastic Beanstalk Environment running Python Sample Application",
      "EnvironmentName" :  "SamplePythonEnvironment",
      "SolutionStackName" : "64bit Amazon Linux running Python",
      "OptionSettings" : [ {
         "Namespace" : "aws:autoscaling:launchconfiguration",
         "OptionName" : "EC2KeyName",
         "Value" : { "Ref" : "KeyName" }
      } ],
      "VersionLabel" : "Initial Version"
   }
}         

See Also