Configuring Amazon EC2 instances with namespace options
You can use the configuration options in the aws:autoscaling:launchconfiguration
namespace to configure the
instances for your environment, including additional options that aren't available in the console.
Important
The DisableIMDSv1
, RootVolumeType
, or BlockDeviceMappings
option setting can cause Elastic Beanstalk to create an environment with a launch template or update an existing environment from launch configurations to launch
templates. For more information, see Launch Templates.
The following configuration file example uses the basic configuration options that are in this topic. For example,
it uses the DisableIMDSv1
option, which is discussed in IMDS. It also uses the EC2KeyName
and IamInstanceProfile
options that are
discussed in Security, and the
BlockDeviceMappings
option, which isn't available in the console.
option_settings:
aws:autoscaling:launchconfiguration:
SecurityGroups: my-securitygroup
MonitoringInterval: "1 minute"
DisableIMDSv1: false
EC2KeyName: my-keypair
IamInstanceProfile: "aws-elasticbeanstalk-ec2-role"
BlockDeviceMappings: "/dev/sdj=:100,/dev/sdh=snap-51eef269,/dev/sdb=ephemeral0"
You can use BlockDeviceMappings
to configure additional block devices for your instances. For more information, see Block Device Mapping in the Amazon EC2 User Guide.
The EB CLI and Elastic Beanstalk console apply recommended values for the preceding options. You must remove these settings if you want to use configuration files to configure the same. See Recommended values for details.