AWS Elastic Beanstalk
Developer Guide (API Version 2010-12-01)
« 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.Did this page help you?  Yes | No |  Tell us about it...

Customizing Environment Resources

You may also want to customize your environment resources that are part of your AWS Elastic Beanstalk environment. For example, you may want to add an Amazon SQS queue and an alarm on queue depth, or you might want to add an Amazon ElastiCache cluster. You can easily customize your environment at the same time that you deploy your application version by including a configuration file with your source bundle.

This section describes the type of information you can include in a configuration file to customize your AWS resources. For general information on customizing and configuring your AWS Elastic Beanstalk environments, see Customizing and Configuring AWS Elastic Beanstalk Environments.

Note

If your application requires access to other AWS resources, we recommend that you use an instance profile. An instance profile provides applications and services access to AWS resources using temporary security credentials. If you are unsure whether you have deployed your application using an instance profile, click Instances on the Configuration page in the Elastic Beanstalk console. For instructions, see Configuring Amazon EC2 Server Instances with AWS Elastic Beanstalk. To learn more about instance profiles, see Using AWS Elastic Beanstalk with AWS Identity and Access Management (IAM) and Using IAM Roles with AWS Elastic Beanstalk. .

Resources

You can use the Resources key to create and customize AWS resources in your environment. For a complete reference, see Customizing AWS Resources.

Syntax

When defining the values for the properties for your resource, there are three different methods you can use to define the values for the properties for a resource:

  • Pass the value

  • Pass a list of values

  • Pass the option name and the value

There are two different functions you can use to retrieve the values for the properties:

  • Use Fn::GetAtt to return the value of an attribute from a resource. For more information, see Fn::GetAtt.

  • Use Ref to return the value of a specified parameter or resource. For more information, see Ref.

Resources: 
  <name of resource>:
    Type: <resource type identifier> 
    Properties: 
      # Example syntax of a property that takes in the actual value
      <property name>: <literal string> 
      
      # Example syntax of a property that takes a list of strings
      <property name>: ["<literal string>", "<literal string>"]
      
      # Example syntax of a property that takes the option name and the value
       <property name>: 
         - Name: <option name>
           Value: <literal string> 
      
      # Example syntax showing how to use Fn::GetAtt to return the value of an attribute from a resource in the configuration file
      <property name>: 
         - Name: <option name>
           Value : { "Fn::GetAtt" : [ "<logicalNameOfResource>", "<attributeName>"] }	

      # Example syntax showing how to use Ref to return the value of a specified parameter or resource. You can use Ref for single property values and lists.
      <property name>: 
          Ref: <parameter reference> 

Options

This table shows the available keys and descriptions for the Resources key.

KeyDescription

<name of resource>

The name for what you want to create your resource. Each resource must have a logical name unique within the configuration file. This is the name you use elsewhere in the configuration file to reference the resource.

This table shows the available keys and descriptions for each resource name you provide.

KeyDescription

Type

This is the resource type identifier. For a list of resource type identifiers, see AWS Resource Types Reference.

Properties

Optional. A Properties section is declared for each resource immediately after the resource Type declaration. Property values can be literal strings, lists of strings, parameter references, pseudo references, or the value returned by a function. If a resource does not require any properties to be declared, you can omit the Properties section of that resource.

AWS Elastic Beanstalk Resource Names

AWS Elastic Beanstalk provides fixed resource names for the AWS resources that it creates for you when you deploy your application. You will need to know these resource names when you reference them in your configuration file.

Resource NameDescription

AWSEBAutoScalingGroup

The name of the Auto Scaling group that AWS Elastic Beanstalk uses when it launches EC2 instances.

AWSEBAutoScalingLaunchConfiguration

The name for the launch configuration settings that AWS Elastic Beanstalk uses when it launches EC2 instances.

AWSEBEnvironmentName

The name of the AWS Elastic Beanstalk environment.

AWSEBLoadBalancer

The name of the elastic load balancer used in the AWS Elastic Beanstalk environment.

AWSEBRDSDatabase

The name of the Amazon RDS database.

AWSEBSecurityGroup

The name for the EC2 security group that AWS Elastic Beanstalk uses when it launches EC2 instances.