Back
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?
You can do it as it is shown in the below code snippet:
import botoc = 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})
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})
Learn how we helped 50,000+ professionals like you !
31k questions
32.8k answers
501 comments
693 users