amazon ec2 - How to create EC2 instance through boto python code -


requests = [conn.request_spot_instances(price=0.0034, image_id='ami-6989a659', count=1,type='one-time', instance_type='m1.micro')]

i used following code..but not working..

use following code create instance python command line.

 import boto.ec2  conn = boto.ec2.connect_to_region("us-west-2",  aws_access_key_id='<aws access key>',  aws_secret_access_key='<aws secret key>')  conn = boto.ec2.connect_to_region("us-west-2")  conn.run_instances('<ami-image-id>',key_name='mykey',   instance_type='t2.micro',  security_groups=['your-security-group-here']) 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -