diff --git a/moto/autoscaling/models.py b/moto/autoscaling/models.py
index da5efb711..a367ba297 100644
--- a/moto/autoscaling/models.py
+++ b/moto/autoscaling/models.py
@@ -29,7 +29,7 @@ class FakeScalingPolicy(object):
class FakeLaunchConfiguration(object):
def __init__(self, name, image_id, key_name, security_groups, user_data,
instance_type, instance_monitoring, instance_profile_name,
- spot_price):
+ spot_price, ebs_optimized):
self.name = name
self.image_id = image_id
self.key_name = key_name
@@ -39,6 +39,7 @@ class FakeLaunchConfiguration(object):
self.instance_monitoring = instance_monitoring
self.instance_profile_name = instance_profile_name
self.spot_price = spot_price
+ self.ebs_optimized = ebs_optimized
@property
def instance_monitoring_enabled(self):
@@ -126,7 +127,7 @@ class AutoScalingBackend(BaseBackend):
def create_launch_configuration(self, name, image_id, key_name,
security_groups, user_data, instance_type,
instance_monitoring, instance_profile_name,
- spot_price):
+ spot_price, ebs_optimized):
launch_configuration = FakeLaunchConfiguration(
name=name,
image_id=image_id,
@@ -137,6 +138,7 @@ class AutoScalingBackend(BaseBackend):
instance_monitoring=instance_monitoring,
instance_profile_name=instance_profile_name,
spot_price=spot_price,
+ ebs_optimized=ebs_optimized,
)
self.launch_configurations[name] = launch_configuration
return launch_configuration
diff --git a/moto/autoscaling/responses.py b/moto/autoscaling/responses.py
index fe7f46b8f..55cdf9b6e 100644
--- a/moto/autoscaling/responses.py
+++ b/moto/autoscaling/responses.py
@@ -33,6 +33,7 @@ class AutoScalingResponse(BaseResponse):
instance_monitoring=instance_monitoring,
instance_profile_name=self._get_param('IamInstanceProfile'),
spot_price=self._get_param('SpotPrice'),
+ ebs_optimized=self._get_param('EbsOptimized'),
)
template = Template(CREATE_LAUNCH_CONFIGURATION_TEMPLATE)
return template.render()
@@ -178,6 +179,7 @@ DESCRIBE_LAUNCH_CONFIGURATIONS_TEMPLATE = """
{% endif %}
+ {{ launch_configuration.ebs_optimized }}
{{ launch_configuration.instance_monitoring_enabled }}
diff --git a/tests/test_autoscaling/test_launch_configurations.py b/tests/test_autoscaling/test_launch_configurations.py
index 446275098..dc56b3d3d 100644
--- a/tests/test_autoscaling/test_launch_configurations.py
+++ b/tests/test_autoscaling/test_launch_configurations.py
@@ -18,7 +18,9 @@ def test_create_launch_configuration():
user_data="This is some user_data",
instance_monitoring=True,
instance_profile_name='arn:aws:iam::123456789012:instance-profile/testing',
- spot_price=0.1)
+ spot_price=0.1,
+ ebs_optimized=True,
+ )
conn.create_launch_configuration(config)
launch_config = conn.get_all_launch_configurations()[0]
@@ -31,6 +33,7 @@ def test_create_launch_configuration():
launch_config.instance_monitoring.enabled.should.equal('true')
launch_config.instance_profile_name.should.equal('arn:aws:iam::123456789012:instance-profile/testing')
launch_config.spot_price.should.equal(0.1)
+ launch_config.ebs_optimized.should.equal(True)
@mock_autoscaling
@@ -57,6 +60,7 @@ def test_create_launch_configuration_defaults():
launch_config.instance_monitoring.enabled.should.equal('false')
launch_config.instance_profile_name.should.equal(None)
launch_config.spot_price.should.equal(None)
+ launch_config.ebs_optimized.should.equal(False)
@mock_autoscaling