Created
December 8, 2009 21:34
-
-
Save tomdyson/252015 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # work with Elastic Load Balancers in the EU region | |
| from boto.ec2 import elb | |
| AWS_ID = '' | |
| AWS_SECRET = '' | |
| HOST = 'eu-west-1.elasticloadbalancing.amazonaws.com' | |
| conn = elb.ELBConnection(AWS_ID, AWS_SECRET,host=HOST) | |
| print conn.get_all_load_balancers() | |
| # add an instance to the load balancer | |
| conn.register_instances('load_balancer_name', ['instance-id']) | |
| # and remove it again | |
| conn.deregister_instances('load_balancer_name', ['instance-id']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment