Amazon EC2 is a web service that enables you to launch and manage server instances in Amazon's data centers. You can use Amazon EC2 server instances at any time, for as long as you need, and for any legal purpose. Instances are available in different sizes and configurations. For more information, go to the Amazon EC2 product page.
You can edit the Elastic Beanstalk environment's Amazon EC2 instance configuration by editing Instances on the Configuration page for that environment. For information about getting to the Configuration page, see Changing Environment Configuration Settings.
Instance type displays the instance types available to your Elastic Beanstalk application. Change the instance type to select a server with the characteristics (including memory size and CPU power) that are most appropriate to your application. For example, applications with intensive and long-running operations may require more CPU or memory. Elastic Beanstalk regularly checks your running instances to ensure they are healthy. If your application consumes 95 percent or greater of the CPU, Elastic Beanstalk will trigger an event. For more information about this event, see CPU Utilization Exceeds 95.00%.
You cannot change between 32-bit and 64-bit instance types. For example, if your application is built on a 32-bit platform, only 32-bit instance types appear in the list.
For more information about the Amazon EC2 instance types available for your Elastic Beanstalk application, see Instance Types in the Amazon Elastic Compute Cloud User Guide.
You can control access to your Elastic Beanstalk application using an Amazon EC2 security group. A security group defines firewall rules for your instances. These rules specify which ingress (i.e., incoming) network traffic should be delivered to your instance. All other ingress traffic will be discarded. You can modify rules for a group at any time. The new rules are automatically enforced for all running instances and instances launched in the future.
You can set up your Amazon EC2 security groups using the Amazon EC2 console. You can specify which Amazon EC2 security groups control access to your Elastic Beanstalk application by entering one or more Amazon EC2 security group names (delimited by commas) into the EC2 security groups text box. For more information on Amazon EC2 security groups, see Amazon EC2 Security Groups in the Amazon Elastic Compute Cloud User Guide.
Elastic Beanstalk creates a default security group for you. If you are using a legacy container, the security group is elasticbeanstalk-default. If you are using a non-legacy container, then Elastic Beanstalk dynamically creates a security group. You can view the security group name in the EC2 security group box.
If you are running your application using a legacy container type, make sure port 80 (HTTP) is accessible from 0.0.0.0/0 as the source CIDR range if you want to enable health checks for your application. For more information about health checks, see Health Checks. To check if you are using a legacy container type, see Why are some container types marked legacy?.
To modify your Amazon EC2 security group
Add a new rule for 80 (HTTP) for your EC2 security group with a new source. For instructions, see Adding Rules to a Security Group in the Amazon Elastic Compute Cloud User Guide.
Type the public DNS address of your EC2 instance in address bar your web browser to verify you can see your application. For instructions on determining your DNS address, see Determining Your Public, Private, and Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide.
You can securely log in to the Amazon EC2 instances provisioned for your Elastic Beanstalk application with an Amazon EC2 key pair.
You must create an Amazon EC2 key pair and configure your Elastic Beanstalk–provisioned Amazon EC2 instances to use the Amazon EC2 key pair before you can access your Elastic Beanstalk–provisioned Amazon EC2 instances. You can set up your Amazon EC2 key pairs using the AWS Management Console. For instructions on creating a key pair for Amazon EC2, see the Amazon Elastic Compute Cloud Getting Started Guide.
The EC2 key pair text box lets you specify the name of an Amazon EC2 key pair you use to securely log in to the Amazon EC2 instances running your Elastic Beanstalk application.
For more information on Amazon EC2 key pairs, see Network and Security in the Amazon Elastic Compute Cloud User Guide. For more information on connecting to Amazon EC2 instances, see Connect to Your Instance and Connecting to Linux/UNIX Instances from Windows using PuTTY in the Amazon Elastic Compute Cloud User Guide.
By default, only basic Amazon CloudWatch metrics are enabled; they return data in five-minute periods. You can enable more granular one-minute CloudWatch metrics by selecting 1 minute for the Monitoring Interval in the Server section of the Configuration tab for your environment in the AWS Toolkit for Eclipse.
Amazon CloudWatch service charges can apply for one-minute interval metrics. See Amazon CloudWatch for more information.
You can override the default AMI used for your Amazon EC2 instances with your own custom AMI by entering the identifier of your custom AMI into the Custom AMI ID box in the Server section of the Configuration tab for your environment in the AWS Toolkit for Eclipse.
Using your own AMI is an advanced task and should be done with care. If you need a custom AMI, we recommend you start with the default Elastic Beanstalk AMI and then modify it. To be considered healthy, Elastic Beanstalk expects Amazon EC2 instances to meet a set of requirements, including having a running host manager. If these requirements are not met, your environment might not work properly.
If you are using a nonlegacy container, you can select an instance profile. If you are using a legacy container, this option does not appear. Instance profiles provide applications and services access to AWS resources. For example, your application may require access to DynamoDB. Every API request made to AWS services must be signed using AWS security credentials. One way to grant applications access to AWS resources is to distribute your credentials to each instance; however, distributing long-term credentials to each instance is challenging to manage and a potential security risk. Instead, Elastic Beanstalk requires an IAM role with the permissions that applications must have when an application makes calls to other AWS resources. When Elastic Beanstalk launches the Amazon EC2 instances, it uses the instance profile associated with an IAM role. All applications that run on the instances can use the role credentials to sign requests. Because role credentials are temporary and rotated automatically, you don't have to worry about long-term security risks.
The Instance profile list displays the profiles available for your Elastic Beanstalk environment. If you do not have any instance profiles, Elastic Beanstalk creates one for you. Elastic Beanstalk creates a default instance profile and updates the Amazon S3 bucket policy to allow log rotation. If you choose to not use the default instance profile, you need to grant permissions for Elastic Beanstalk to rotate logs. For more information about this policy, see Example: Granting Elastic Beanstalk Permission to Rotate Logs to Amazon S3. For a list of supported container types, see Why are some container types marked legacy?.
Users must have permission to create a default profile. For more information, see Granting IAM Users Permissions to Create and Pass IAM Roles.
You can configure a root volume (otherwise known as a boot device) to attach to Amazon EC2 instances in your Elastic Beanstalk environment. An Amazon EBS volume is a durable, block-level storage device that you can attach to a single Amazon EC2 instance. After a volume is attached to an instance, you can use it like any other physical hard drive. The Root volume type list includes Magnetic, General Purpose (SSD), and Provisioned IOPS (SSD) volume types. Select the volume type that meets your performance and price requirements. For more information, see Amazon EBS Volume Types and Amazon EBS Product Details.
With Root volume size, you can specify the size of the storage volume that you selected. You must specify your desired root volume size if you choose Provisioned IOPS (SSD) as the root volume type that your instances will use. For other root volumes, if you do not specify your own value, Elastic Beanstalk will use the default volume size for the storage volume type. The default volume size varies according to the AMI of the solution stack on which your environment is based. For Provisioned IOPS (SSD) root volumes, the minimum number of gibibytes is 10 and the maximum is 1024. For other root volumes, the minimum number of gibibytes is 8 and the maximum is 1024.
If you selected Provisioned IOPS (SSD) as your root volume type, you must specify your desired input/output operations per second (IOPS). The minimum is 100 and the maximum is 4000. The maximum ratio of IOPS to your volume size is 30 to 1. For example, a volume with 3000 IOPS must be at least 100 GiB.
You cannot configure this option using the AWS Management Console. Use the EB CLI config command or EB Extensions to change the required configuration options in the aws:autoscaling:launchconfiguration namespace.
Although each Amazon Elastic Compute Cloud instance has an associated root device volume upon launch, you can use block device mappings to specify additional Amazon Elastic Block Store volumes or instance store volumes to attach to all the instances in the autoscaling group. For more information about block device mappings, see Block Device Mapping in the Amazon Elastic Cloud Computer User Guide. For more information about instance storage, see Amazon EC2 Instance Store in the Amazon Elastic Cloud Computer User Guide.
For information about all the option values you can pass, see Option Values.
To edit an application's environment settings
UpdateEnvironment with the following
https://elasticbeanstalk.us-west-2.amazon.com/?EnvironmentName=SampleAppEnv &OptionSettings.member.1.Namespace=aws%3Aautoscaling%3Alaunchconfiguration &OptionSettings.member.1.OptionName=InstanceType &OptionSettings.member.1.Value=m1.small &OptionSettings.member.2.Namespace=aws%3Aautoscaling%3Alaunchconfiguration &OptionSettings.member.2.OptionName=SecurityGroups &OptionSettings.member.2.Value=awseb-e-98pjjgr9cs-stack-AWSEBSecurityGroup-D1FOQASTKD12 &OptionSettings.member.3.Namespace=aws%3Aautoscaling%3Alaunchconfiguration &OptionSettings.member.3.OptionName=EC2KeyName &OptionSettings.member.3.Value=mykeypair &OptionSettings.member.4.Namespace=aws%3Aautoscaling%3Alaunchconfiguration &OptionSettings.member.4.OptionName=MonitoringInterval &OptionSettings.member.4.Value=5%20minute &OptionSettings.member.5.Namespace=aws%3Aautoscaling%3Alaunchconfiguration &OptionSettings.member.5.OptionName=ImageId &OptionSettings.member.5.Value=ami-cbab67a2 &OptionSettings.member.6.Namespace=aws%3Aautoscaling%3Alaunchconfiguration &OptionSettings.member.6.OptionName=IamInstanceProfile &OptionSettings.member.6.Value=ElasticBeanstalkProfile &OptionSettings.member.7.Namespace=aws%3Aautoscaling%3Alaunchconfiguration &OptionSettings.member.7.OptionName=BlockDeviceMappings &OptionSettings.member.7.Value=/dev/sdj=:100,/dev/sdh=snap-51eef269,/dev/sdb=ephemeral0 &Operation=UpdateEnvironment &AuthParams