我用博托产卵的基础上的AMI一个新的EC2实例。
该ami.run方法有许多参数,但没有为名 - 也许这就是所谓的不同的东西。
解决方案 进口博托
C = boto.connect_ec2(ec2_key,ec2_secret)
图像= c.get_image(ec2_ami)
预订= image.run(KEY_NAME = ec2_keypair,
security_groups = ec2_secgroups,
INSTANCE_TYPE = ec2_instancetype)
例如= reservation.instances [0]
c.create_tags([instance.id] {姓名:INSTANCE_NAME})
I'm using boto to spawn a new EC2 instance based on an AMI.
The ami.run method has a number of parameters, but none for "name" - maybe it's called something different?
解决方案import boto
c = boto.connect_ec2(ec2_key, ec2_secret)
image = c.get_image(ec2_ami)
reservation = image.run(key_name=ec2_keypair,
security_groups=ec2_secgroups,
instance_type=ec2_instancetype)
instance = reservation.instances[0]
c.create_tags([instance.id], {"Name": instance_name})
上一篇:使用Java API的S3 / AWS SSL的问题:;主机名的证书不匹配&QUOT"不匹配、主机名、证书、问题
下一篇:设置foobar.com和www.foobar.com指向我的Amazon S3托管网站我的、网站、com、foobar