Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import yaml
  4. import boto
  5.  
  6.  
  7. print "import worked"
  8.  
  9. #serverlist = open ("aws-server-list",'a')
  10.  
  11. ec2 = boto.connect_ec2()
  12.  
  13. x = 0
  14. #wait for the instance to boot
  15. for r in ec2.get_all_instances():
  16. kill = ec2.stop_instances(instance_ids=[r.id])
  17. x = x + 1
  18.  
  19. print x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement