Share EC2 instances among multiple load balancers

Download amazon Elastic load balancer API tools

export the home:-

export AWS_ELB_HOME=/root/ElasticLoadBalancing-1.0.14.3/

Add your credentials in /root/my-account-creds.txt

# cat /root/my-account-creds.txt
AWSAccessKeyId=XXXXXXXXX
AWSSecretKey=xxxxxxxxxxxxxxxxxxxxxx

Suppose kiranchand.com is the name of loadbalancer you have created.  In this way you can share a set of EC2 instances across different load balancers.

# /root/ElasticLoadBalancing-1.0.14.3/bin/elb-register-instances-with-lb kiranchand-com –instances i-e4515989,i-fedad293,i-4974fc27,i-70c6ed10  –aws-credential-file /root/my-account-creds.txt
INSTANCE_ID  i-e4515989
INSTANCE_ID  i-fedad293
INSTANCE_ID  i-4974fc27
INSTANCE_ID  i-70c6ed10

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: