| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
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 if you have deployed your application using an instance profile, you can check the Server tab in the Edit Configuration window in the Elastic Beanstalk console. For instructions, see Instance Profiles. To learn more about instance profiles, see Granting Permissions to Users and Services Using IAM Roles. .
You can use the Resources key to create and customize AWS resources in your
environment. For a complete reference, see Customizing AWS Resources.
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>
This table shows the available keys and descriptions for the Resources key.
| Key | Description |
|---|---|
|
|
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.
| Key | Description |
|---|---|
|
|
This is the resource type identifier. For a list of resource type identifiers, see AWS Resource Types Reference. |
|
|
Optional. A |
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 Name | Description |
|---|---|
|
|
The name of the Auto Scaling group that AWS Elastic Beanstalk uses when it launches EC2 instances. |
|
|
The name for the launch configuration settings that AWS Elastic Beanstalk uses when it launches EC2 instances. |
|
|
The name of the AWS Elastic Beanstalk environment. |
|
|
The name of the elastic load balancer used in the AWS Elastic Beanstalk environment. |
|
|
The name of the Amazon RDS database. |
|
|
The name for the EC2 security group that AWS Elastic Beanstalk uses when it launches EC2 instances. |