The Amazon EC2 instances for your Elastic Beanstalk environment
This topic explains the function of Amazon EC2 instances, how they are auto scaled in your environment, and the different EC2 purchase options that Elastic Beanstalk supports. This topic also explains how to configure these functions and options.
When you create a web server environment, AWS Elastic Beanstalk creates one or more Amazon Elastic Compute Cloud (Amazon EC2) virtual machines, known as Instances.
The instances in your environment are configured to run web apps on the platform that you choose. You can make changes to various properties and behaviors of your environment's instances when you create your environment or after it's already running. Or, you can already make these changes by modifying the source code that you deploy to the environment. For for more information, see Configuration options.
Note
The Auto Scaling group in your environment manages the Amazon EC2 instances that run your application. When you make configuration changes that are described on this page, the launch configuration also changes. The launch configuration is either an Amazon EC2 launch template or an Auto Scaling group launch configuration resource. This change requires replacement of all instances. It also triggers either a rolling update or immutable update, depending on which one is configured.
EC2 instance purchasing options
Elastic Beanstalk supports several Amazon EC2 instance purchasing options:
-
On-Demand — An On-Demand Instance is a pay-as-you-go resource—there's no long-term commitment required when you use it.
-
Reserved — A Reserved Instance is a pre-purchased billing discount applied automatically to matching On-Demand instances in your environment.
-
Spot — A Spot Instance is an unused Amazon EC2 instance that is available for less than the On-Demand price. You can enable Spot Instances in your environment by setting a single option. You can configure Spot Instance usage, including the mix of On-Demand and Spot Instances, using additional options. For more information, see Auto Scaling group.