Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in AWS by (19.1k points)

I'm using boto to spawn a new EC2 instance based on an AMI.

The method has a number of parameters, but none for "name" - maybe it's called something different?

1 Answer

0 votes
by (44.3k points)

You can do it as it is shown in the below code snippet:

import boto

c = boto.connect_ec2(ec2_key, ec2_secret)

image = c.get_image(ec2_ami)

reservation =,



instance = reservation.instances[0]

c.create_tags([], {"Name": instance_name})

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94.2k users

Browse Categories