Elastic Beanstalk
Developer Guide (API Version 2010-12-01)
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.

Customizing Environment Resources

You may also want to customize your environment resources that are part of your 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 Elastic Beanstalk environments, see Elastic Beanstalk Environment Configuration.

Note

Elastic Beanstalk requires you to use IAM roles to launch an environment and to manage environments and applications. An instance profile is associated with an IAM role that can be configured to provide 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 Elastic Beanstalk. To learn more about instance profiles, see Using Elastic Beanstalk with AWS Identity and Access Management (IAM) and Using IAM Roles with 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::Join.

  • 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.

Elastic Beanstalk Resource Names

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 Elastic Beanstalk uses when it launches EC2 instances.

AWSEBAutoScalingLaunchConfiguration

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

AWSEBEnvironmentName

The name of the Elastic Beanstalk environment.

AWSEBLoadBalancer

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

AWSEBRDSDatabase

The name of the Amazon RDS database.

AWSEBSecurityGroup

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

AWSEBWorkerQueue

The Amazon SQS queue from which the daemon in a worker environment tier pulls requests that need to be processed.

AWSEBWorkerDeadLetterQueue

The Amazon SQS queue that stores messages that cannot be delivered or otherwise were not successfully processed by the daemon in a worker environment tier.

AWSEBWorkerCronLeaderRegistry

The Amazon DynamoDB table that is the internal registry used by the daemon in a worker environment tier for periodic tasks.