Wednesday, 15 April 2015

amazon web services - How to define block_device_mappings when using boto.ec2.autoscale.launchconfig.LaunchConfiguration(), -



amazon web services - How to define block_device_mappings when using boto.ec2.autoscale.launchconfig.LaunchConfiguration(), -

i'm trying using boto create launch configuration auto scaling, don't know how define block_device_mappings.

the code snapshots this:

dev_sdf = boto.ec2.blockdevicemapping.ebsblockdevicetype(snapshot_id = self.sna_data.id) bdm = boto.ec2.blockdevicemapping.blockdevicemapping() bdm['/dev/sdf'] = dev_sdf lc = launchconfig.launchconfiguration(connection = self.as_conn, name = lc_name, image_id = self.ami.id, instance_type = self.instance_type, key_name = aws_key_name, security_groups = self.security_groups, spot_price = self.price, block_device_mappings = [bdm]) self.as_conn.create_launch_configuration(lc)

but got:

boto.exception.botoservererror: botoservererror: 400 bad request <errorresponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/"> <error> <type>sender</type> <code>validationerror</code> <message>1 validation error detected: value null @ 'blockdevicemappings.1.member.devicename' failed satisfy constraint: fellow member must not null</message> </error> <requestid>7289473c-7bc1-11e2-a07c-93de372a2cc0</requestid> </errorresponse>

how should define block_device_mappings?

i don't think code loads mappings in can ever work.

i've create pull request against boto code should pull device mappings across properly:

https://github.com/pasc/boto/tree/bdm_for_autoscaling_groups

amazon-web-services boto autoscaling

No comments:

Post a Comment