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
Advertisement