# Attach an ec2 instance on the existing ELB

**URL:** <https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025>\
**Category:** Chef Infra (archive)\
**Created:** [May 28, 2013, 1:27pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025 "2013-05-28T13:27:42Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chandan\_Maheshwari](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Chandan\_Maheshwari](https://discourse.chef.io/u/Chandan_Maheshwari)\
**Post date:** [May 28, 2013, 1:27pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/1 "2013-05-28T13:27:42Z")

</div>

Hi All,

I want to attach an ec2 instance, once it is created using knife ec2 plugin  
and after applying my runlist to it, to the existing ELB I have.

How can I do this, is there any ready cookbook/LWRP for this. I have one  
very good solution to this, thanks to Ivan [which is working fine and  
creating the instances, attaching them to the ELB I provide] :  
[http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)

but I don’t want to create instance without using knife (and manually  
install chef-client and dependencies)

–  
Thanks and Regards,  
Chandan

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [May 28, 2013, 3:54pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/2 "2013-05-28T15:54:17Z")

</div>

Chandan,

You might want to look at the aws cookbook:  
[http://community.opscode.com/cookbooks/aws](http://community.opscode.com/cookbooks/aws)

For example, to register the node in the 'QA' ELB:

aws\_elastic\_lb "elb\_qa" do  
aws\_access\_key aws['aws\_access\_key\_id']  
aws\_secret\_access\_key aws['aws\_secret\_access\_key']  
name "QA"  
action :register  
end

-M

On Tue, May 28, 2013 at 9:27 AM, Chandan Maheshwari  
[cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:

> Hi All,
> 
> I want to attach an ec2 instance, once it is created using knife ec2 plugin  
> and after applying my runlist to it, to the existing ELB I have.
> 
> How can I do this, is there any ready cookbook/LWRP for this. I have one  
> very good solution to this, thanks to Ivan [which is working fine and  
> creating the instances, attaching them to the ELB I provide] :  
> [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)
> 
> but I don't want to create instance without using knife (and manually  
> install chef-client and dependencies)
> 
> --  
> Thanks and Regards,  
> Chandan

---

<div class="post-metadata">

**Author:** ![Chandan\_Maheshwari](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Chandan\_Maheshwari](https://discourse.chef.io/u/Chandan_Maheshwari)\
**Post date:** [May 28, 2013, 3:57pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/3 "2013-05-28T15:57:48Z")

</div>

Thanks Mike for your prompt response.

I was just looking on the same cookbook and wrote once recipe(to register  
my ec2 instance), but it gave me error  
Suppose,

my ELB is NAME  
cookbook having recipe to register instance is cookbook\_name

FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME] (cookbook\_name::register  
line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC is  
not supported in this version of API. Please try 2011-11-15 or newer.

On Tue, May 28, 2013 at 9:24 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:

> Chandan,
> 
> You might want to look at the aws cookbook:  
> [http://community.opscode.com/cookbooks/aws](http://community.opscode.com/cookbooks/aws)
> 
> For example, to register the node in the 'QA' ELB:
> 
> aws\_elastic\_lb "elb\_qa" do  
> aws\_access\_key aws['aws\_access\_key\_id']  
> aws\_secret\_access\_key aws['aws\_secret\_access\_key']  
> name "QA"  
> action :register  
> end
> 
> -M
> 
> On Tue, May 28, 2013 at 9:27 AM, Chandan Maheshwari  
> [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> 
> > Hi All,
> > 
> > I want to attach an ec2 instance, once it is created using knife ec2  
> > plugin  
> > and after applying my runlist to it, to the existing ELB I have.
> > 
> > How can I do this, is there any ready cookbook/LWRP for this. I have one  
> > very good solution to this, thanks to Ivan [which is working fine and  
> > creating the instances, attaching them to the ELB I provide] :
> 
> [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)
> 
> > but I don't want to create instance without using knife (and manually  
> > install chef-client and dependencies)
> > 
> > --  
> > Thanks and Regards,  
> > Chandan

--  
Regards,  
Chandan

---

<div class="post-metadata">

**Author:** ![Joshua\_Timberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/joshua_timberman/32/424_2.png) [@Joshua\_Timberman](https://discourse.chef.io/u/Joshua_Timberman)\
**Post date:** [May 28, 2013, 4:02pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/4 "2013-05-28T16:02:58Z")

</div>

Ohai,

What is the goal here? Are you trying to set up something for autoscaling? Or are you just looking to register new nodes with an ELB?

If you're doing autoscaling, I'd consider building a custom AMI for the nodes that need to autoscale. I'd make that with the validation.pem and JSON with the run list for the nodes you want, and also sets up chef-client to run at launch or as a service.

If you just want to add nodes to an ELB, Opscode's "aws" cookbook has an elastic\_lb resource, which you could use in your own cookbook. I'd assign the ELB name as an attribute in the role for the node's in the role you want to use, and then reference that attribute in the resource.

```
aws_elastic_lb 'my-load-balancer' do
  name node['aws']['load_balancer']
  aws_access_key aws['aws_access_key_id']
  aws_secret_access_key aws['aws_secret_access_key']
end

```

On May 28, 2013, at 7:27 AM, Chandan Maheshwari [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:

> I want to attach an ec2 instance, once it is created using knife ec2 plugin and after applying my runlist to it, to the existing ELB I have.
> 
> How can I do this, is there any ready cookbook/LWRP for this. I have one very good solution to this, thanks to Ivan [which is working fine and creating the instances, attaching them to the ELB I provide] :  
> [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)
> 
> but I don't want to create instance without using knife (and manually install chef-client and dependencies)

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [May 28, 2013, 4:04pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/5 "2013-05-28T16:04:42Z")

</div>

Chandan,

That looks to be a bug with the right\_aws gem that the aws cookbook  
depends on, and there is an open issue here:

> <https://github.com/flexera-public/right_aws/issues/146>
>
> http://docs.amazonwebservices.com/ElasticLoadBalancing/2012-06-01/DeveloperGuide…/Welcome.html

I suspect is has to do with the case of ELB and VPC combination, and  
hopefully sometime that will get merged in and released, irrespective  
of Chef.

-M

On Tue, May 28, 2013 at 11:57 AM, Chandan Maheshwari  
[cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:

> Thanks Mike for your prompt response.
> 
> I was just looking on the same cookbook and wrote once recipe(to register my  
> ec2 instance), but it gave me error  
> Suppose,
> 
> my ELB is NAME  
> cookbook having recipe to register instance is cookbook\_name
> 
> FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME] (cookbook\_name::register  
> line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC is not  
> supported in this version of API. Please try 2011-11-15 or newer.
> 
> On Tue, May 28, 2013 at 9:24 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> 
> > Chandan,
> > 
> > You might want to look at the aws cookbook:  
> > [http://community.opscode.com/cookbooks/aws](http://community.opscode.com/cookbooks/aws)
> > 
> > For example, to register the node in the 'QA' ELB:
> > 
> > aws\_elastic\_lb "elb\_qa" do  
> > aws\_access\_key aws['aws\_access\_key\_id']  
> > aws\_secret\_access\_key aws['aws\_secret\_access\_key']  
> > name "QA"  
> > action :register  
> > end
> > 
> > -M
> > 
> > On Tue, May 28, 2013 at 9:27 AM, Chandan Maheshwari  
> > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > 
> > > Hi All,
> > > 
> > > I want to attach an ec2 instance, once it is created using knife ec2  
> > > plugin  
> > > and after applying my runlist to it, to the existing ELB I have.
> > > 
> > > How can I do this, is there any ready cookbook/LWRP for this. I have one  
> > > very good solution to this, thanks to Ivan [which is working fine and  
> > > creating the instances, attaching them to the ELB I provide] :
> > > 
> > > [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)
> > > 
> > > but I don't want to create instance without using knife (and manually  
> > > install chef-client and dependencies)
> > > 
> > > --  
> > > Thanks and Regards,  
> > > Chandan
> 
> --  
> Regards,  
> Chandan

---

<div class="post-metadata">

**Author:** ![Chandan\_Maheshwari](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Chandan\_Maheshwari](https://discourse.chef.io/u/Chandan_Maheshwari)\
**Post date:** [May 28, 2013, 4:14pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/6 "2013-05-28T16:14:39Z")

</div>

Ohai,

W_hat is the goal here? Are you trying to set up something for autoscaling?  
Or are you just looking to register new nodes with an ELB?_

```
                           I wanted to set up for autoscaling only.

```

What is the difference b/w , "register a newly created node to ELB" vs  
setup for autoscaling.

- If you're doing autoscaling, I'd consider building a custom AMI for the  
nodes that need to autoscale. I'd make that with the validation.pem and  
JSON with the run list for the nodes you want, and also sets up chef-client  
to run at launch or as a service.
- 

```
                           Sorry but I didn't get actually the way to

```

create AMI, also does it make any difference if every time I trigger to use  
basic AMI and then apply my cookbooks on them and then register them again  
to the ELB vs just use the AMI with runlist set as JSON and chef-client to  
run as a service [except it would be a faster way]

If you just want to add nodes to an ELB, Opscode's "aws" cookbook has an  
elastic\_lb resource, which you could use in your own cookbook. I'd assign  
the ELB name as an attribute in the role for the node's in the role you  
want to use, and then reference that attribute in the resource.

```
aws_elastic_lb 'my-load-balancer' do
  name node['aws']['load_balancer']
  aws_access_key aws['aws_access_key_id']
  aws_secret_access_key aws['aws_secret_access_key']
end

                            I used that but it gives me below error:
               " Suppose my ELB is NAME
                  cookbook having recipe to register instance is

```

cookbook\_name

\*FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME] (cookbook\_name::register  
line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC is  
not supported in this version of API. Please try 2011-11-15 or newer."

- 
- 
- 

On Tue, May 28, 2013 at 9:34 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:

> Chandan,
> 
> That looks to be a bug with the right\_aws gem that the aws cookbook  
> depends on, and there is an open issue here:  
> [Update to support 'InstanceProtocol' in the ELB API 2012-06-01 · Issue #146 · flexera-public/right\_aws · GitHub](https://github.com/rightscale/right_aws/issues/146)
> 
> I suspect is has to do with the case of ELB and VPC combination, and  
> hopefully sometime that will get merged in and released, irrespective  
> of Chef.
> 
> -M
> 
> On Tue, May 28, 2013 at 11:57 AM, Chandan Maheshwari  
> [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> 
> > Thanks Mike for your prompt response.
> > 
> > I was just looking on the same cookbook and wrote once recipe(to  
> > register my  
> > ec2 instance), but it gave me error  
> > Suppose,
> > 
> > my ELB is NAME  
> > cookbook having recipe to register instance is cookbook\_name
> > 
> > FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME] (cookbook\_name::register  
> > line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC is  
> > not  
> > supported in this version of API. Please try 2011-11-15 or newer.
> > 
> > On Tue, May 28, 2013 at 9:24 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > 
> > > Chandan,
> > > 
> > > You might want to look at the aws cookbook:  
> > > [http://community.opscode.com/cookbooks/aws](http://community.opscode.com/cookbooks/aws)
> > > 
> > > For example, to register the node in the 'QA' ELB:
> > > 
> > > aws\_elastic\_lb "elb\_qa" do  
> > > aws\_access\_key aws['aws\_access\_key\_id']  
> > > aws\_secret\_access\_key aws['aws\_secret\_access\_key']  
> > > name "QA"  
> > > action :register  
> > > end
> > > 
> > > -M
> > > 
> > > On Tue, May 28, 2013 at 9:27 AM, Chandan Maheshwari  
> > > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > > 
> > > > Hi All,
> > > > 
> > > > I want to attach an ec2 instance, once it is created using knife ec2  
> > > > plugin  
> > > > and after applying my runlist to it, to the existing ELB I have.
> > > > 
> > > > How can I do this, is there any ready cookbook/LWRP for this. I have  
> > > > one  
> > > > very good solution to this, thanks to Ivan [which is working fine and  
> > > > creating the instances, attaching them to the ELB I provide] :
> 
> [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)
> 
> > > > but I don't want to create instance without using knife (and manually  
> > > > install chef-client and dependencies)
> > > > 
> > > > --  
> > > > Thanks and Regards,  
> > > > Chandan
> > 
> > --  
> > Regards,  
> > Chandan

--  
Regards,  
Chandan

---

<div class="post-metadata">

**Author:** ![Chandan\_Maheshwari](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Chandan\_Maheshwari](https://discourse.chef.io/u/Chandan_Maheshwari)\
**Post date:** [May 28, 2013, 4:16pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/7 "2013-05-28T16:16:39Z")

</div>

Hi Mike,  
Thanks for pointing this out:

That looks to be a bug with the right\_aws gem that the aws cookbook depends  
on, and there is an open issue here:  
When can we expect it to get solved.

Is there any other way of doing this.

On Tue, May 28, 2013 at 9:44 PM, Chandan Maheshwari \<[cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com)

> wrote:

> Ohai,
> 
> W_hat is the goal here? Are you trying to set up something for  
> autoscaling? Or are you just looking to register new nodes with an ELB?_
> 
> ```
> I wanted to set up for autoscaling only.
> 
> ```
> 
> What is the difference b/w , "register a newly created node to ELB" vs  
> setup for autoscaling.
> 
> - If you're doing autoscaling, I'd consider building a custom AMI for the  
> nodes that need to autoscale. I'd make that with the validation.pem and  
> JSON with the run list for the nodes you want, and also sets up chef-client  
> to run at launch or as a service.
> - 
> 
> ```
> Sorry but I didn't get actually the way
> 
> ```
> 
> to create AMI, also does it make any difference if every time I trigger to  
> use basic AMI and then apply my cookbooks on them and then register them  
> again to the ELB vs just use the AMI with runlist set as JSON and  
> chef-client to run as a service [except it would be a faster way]
> 
> If you just want to add nodes to an ELB, Opscode's "aws" cookbook has an  
> elastic\_lb resource, which you could use in your own cookbook. I'd assign  
> the ELB name as an attribute in the role for the node's in the role you  
> want to use, and then reference that attribute in the resource.
> 
> ```
> aws_elastic_lb 'my-load-balancer' do
> name node['aws']['load_balancer']
> aws_access_key aws['aws_access_key_id']
> aws_secret_access_key aws['aws_secret_access_key']
> end
> 
> I used that but it gives me below error:
> " Suppose my ELB is NAME
> 
> cookbook having recipe to register instance is
> 
> ```
> 
> cookbook\_name
> 
> \*FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME] (cookbook\_name::register  
> line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC is  
> not supported in this version of API. Please try 2011-11-15 or newer."
> 
> - 
> - 
> - 
> 
> On Tue, May 28, 2013 at 9:34 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> 
> > Chandan,
> > 
> > That looks to be a bug with the right\_aws gem that the aws cookbook  
> > depends on, and there is an open issue here:  
> > [Update to support 'InstanceProtocol' in the ELB API 2012-06-01 · Issue #146 · flexera-public/right\_aws · GitHub](https://github.com/rightscale/right_aws/issues/146)
> > 
> > I suspect is has to do with the case of ELB and VPC combination, and  
> > hopefully sometime that will get merged in and released, irrespective  
> > of Chef.
> > 
> > -M
> > 
> > On Tue, May 28, 2013 at 11:57 AM, Chandan Maheshwari  
> > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > 
> > > Thanks Mike for your prompt response.
> > > 
> > > I was just looking on the same cookbook and wrote once recipe(to  
> > > register my  
> > > ec2 instance), but it gave me error  
> > > Suppose,
> > > 
> > > my ELB is NAME  
> > > cookbook having recipe to register instance is cookbook\_name
> > > 
> > > FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME] (cookbook\_name::register  
> > > line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC  
> > > is not  
> > > supported in this version of API. Please try 2011-11-15 or newer.
> > > 
> > > On Tue, May 28, 2013 at 9:24 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > > 
> > > > Chandan,
> > > > 
> > > > You might want to look at the aws cookbook:  
> > > > [http://community.opscode.com/cookbooks/aws](http://community.opscode.com/cookbooks/aws)
> > > > 
> > > > For example, to register the node in the 'QA' ELB:
> > > > 
> > > > aws\_elastic\_lb "elb\_qa" do  
> > > > aws\_access\_key aws['aws\_access\_key\_id']  
> > > > aws\_secret\_access\_key aws['aws\_secret\_access\_key']  
> > > > name "QA"  
> > > > action :register  
> > > > end
> > > > 
> > > > -M
> > > > 
> > > > On Tue, May 28, 2013 at 9:27 AM, Chandan Maheshwari  
> > > > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > > > 
> > > > > Hi All,
> > > > > 
> > > > > I want to attach an ec2 instance, once it is created using knife ec2  
> > > > > plugin  
> > > > > and after applying my runlist to it, to the existing ELB I have.
> > > > > 
> > > > > How can I do this, is there any ready cookbook/LWRP for this. I have  
> > > > > one  
> > > > > very good solution to this, thanks to Ivan [which is working fine and  
> > > > > creating the instances, attaching them to the ELB I provide] :
> > 
> > [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)
> > 
> > > > > but I don't want to create instance without using knife (and manually  
> > > > > install chef-client and dependencies)
> > > > > 
> > > > > --  
> > > > > Thanks and Regards,  
> > > > > Chandan
> > > 
> > > --  
> > > Regards,  
> > > Chandan
> 
> --  
> Regards,  
> Chandan

--  
Regards,  
Chandan

---

<div class="post-metadata">

**Author:** ![Chandan\_Maheshwari](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Chandan\_Maheshwari](https://discourse.chef.io/u/Chandan_Maheshwari)\
**Post date:** [May 28, 2013, 4:37pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/8 "2013-05-28T16:37:58Z")

</div>

Mike, What I meant by the "Other way" is any other cookbook or replacement  
of gem right\_aws.

It seems to be standard cookbook, Joshua also recommended me "aws" cookbook  
only.

On Tue, May 28, 2013 at 9:46 PM, Chandan Maheshwari \<[cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com)

> wrote:

> Hi Mike,  
> Thanks for pointing this out:
> 
> That looks to be a bug with the right\_aws gem that the aws cookbook  
> depends on, and there is an open issue here:  
> When can we expect it to get solved.
> 
> Is there any other way of doing this.
> 
> On Tue, May 28, 2013 at 9:44 PM, Chandan Maheshwari \<  
> [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com)\> wrote:
> 
> > Ohai,
> > 
> > W_hat is the goal here? Are you trying to set up something for  
> > autoscaling? Or are you just looking to register new nodes with an ELB?_
> > 
> > ```
> > I wanted to set up for autoscaling only.
> > 
> > ```
> > 
> > What is the difference b/w , "register a newly created node to ELB" vs  
> > setup for autoscaling.
> > 
> > - If you're doing autoscaling, I'd consider building a custom AMI for  
> > the nodes that need to autoscale. I'd make that with the validation.pem and  
> > JSON with the run list for the nodes you want, and also sets up chef-client  
> > to run at launch or as a service.
> > - 
> > 
> > ```
> > Sorry but I didn't get actually the way
> > 
> > ```
> > 
> > to create AMI, also does it make any difference if every time I trigger to  
> > use basic AMI and then apply my cookbooks on them and then register them  
> > again to the ELB vs just use the AMI with runlist set as JSON and  
> > chef-client to run as a service [except it would be a faster way]
> > 
> > If you just want to add nodes to an ELB, Opscode's "aws" cookbook has an  
> > elastic\_lb resource, which you could use in your own cookbook. I'd assign  
> > the ELB name as an attribute in the role for the node's in the role you  
> > want to use, and then reference that attribute in the resource.
> > 
> > ```
> > aws_elastic_lb 'my-load-balancer' do
> > name node['aws']['load_balancer']
> > aws_access_key aws['aws_access_key_id']
> > aws_secret_access_key aws['aws_secret_access_key']
> > end
> > 
> > I used that but it gives me below error:
> > " Suppose my ELB is NAME
> > 
> > cookbook having recipe to register instance is
> > 
> > ```
> > 
> > cookbook\_name
> > 
> > \*FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME]  
> > (cookbook\_name::register line 3) had an error: RightAws::AwsError:  
> > ValidationError: ELB in VPC is not supported in this version of API. Please  
> > try 2011-11-15 or newer."
> > 
> > - 
> > - 
> > - 
> > 
> > On Tue, May 28, 2013 at 9:34 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > 
> > > Chandan,
> > > 
> > > That looks to be a bug with the right\_aws gem that the aws cookbook  
> > > depends on, and there is an open issue here:  
> > > [Update to support 'InstanceProtocol' in the ELB API 2012-06-01 · Issue #146 · flexera-public/right\_aws · GitHub](https://github.com/rightscale/right_aws/issues/146)
> > > 
> > > I suspect is has to do with the case of ELB and VPC combination, and  
> > > hopefully sometime that will get merged in and released, irrespective  
> > > of Chef.
> > > 
> > > -M
> > > 
> > > On Tue, May 28, 2013 at 11:57 AM, Chandan Maheshwari  
> > > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > > 
> > > > Thanks Mike for your prompt response.
> > > > 
> > > > I was just looking on the same cookbook and wrote once recipe(to  
> > > > register my  
> > > > ec2 instance), but it gave me error  
> > > > Suppose,
> > > > 
> > > > my ELB is NAME  
> > > > cookbook having recipe to register instance is cookbook\_name
> > > > 
> > > > FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME]  
> > > > (cookbook\_name::register  
> > > > line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC  
> > > > is not  
> > > > supported in this version of API. Please try 2011-11-15 or newer.
> > > > 
> > > > On Tue, May 28, 2013 at 9:24 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > > > 
> > > > > Chandan,
> > > > > 
> > > > > You might want to look at the aws cookbook:  
> > > > > [http://community.opscode.com/cookbooks/aws](http://community.opscode.com/cookbooks/aws)
> > > > > 
> > > > > For example, to register the node in the 'QA' ELB:
> > > > > 
> > > > > aws\_elastic\_lb "elb\_qa" do  
> > > > > aws\_access\_key aws['aws\_access\_key\_id']  
> > > > > aws\_secret\_access\_key aws['aws\_secret\_access\_key']  
> > > > > name "QA"  
> > > > > action :register  
> > > > > end
> > > > > 
> > > > > -M
> > > > > 
> > > > > On Tue, May 28, 2013 at 9:27 AM, Chandan Maheshwari  
> > > > > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > > > > 
> > > > > > Hi All,
> > > > > > 
> > > > > > I want to attach an ec2 instance, once it is created using knife ec2  
> > > > > > plugin  
> > > > > > and after applying my runlist to it, to the existing ELB I have.
> > > > > > 
> > > > > > How can I do this, is there any ready cookbook/LWRP for this. I  
> > > > > > have one  
> > > > > > very good solution to this, thanks to Ivan [which is working fine  
> > > > > > and  
> > > > > > creating the instances, attaching them to the ELB I provide] :
> > > 
> > > [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)
> > > 
> > > > > > but I don't want to create instance without using knife (and  
> > > > > > manually  
> > > > > > install chef-client and dependencies)
> > > > > > 
> > > > > > --  
> > > > > > Thanks and Regards,  
> > > > > > Chandan
> > > > 
> > > > --  
> > > > Regards,  
> > > > Chandan
> > 
> > --  
> > Regards,  
> > Chandan
> 
> --  
> Regards,  
> Chandan

--  
Regards,  
Chandan

---

<div class="post-metadata">

**Author:** ![Mike](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/mike/32/18_2.png) [@Mike](https://discourse.chef.io/u/Mike)\
**Post date:** [May 28, 2013, 8:47pm UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/9 "2013-05-28T20:47:51Z")

</div>

> > When can we expect it to get solved.  
> > Whenever RightScale gem maintainers decide to merge and release.  
> > Chef-related community have no input, other than "if this affects you,  
> > go mention it on the pull request".

> > Is there any other way of doing this.  
> > Since you're using ELB and VPC, you may have to do something yourself.  
> > You might want to look further into the Fog gem, since this is pretty  
> > up-to-date with most of the APIs in use.  
> > [http://fog.io/](http://fog.io/)

There's also The AWS-released SDK for Ruby that might be able to do the same.

> **[AWS SDK for Ruby](https://aws.amazon.com/sdk-for-ruby/)**

Your mileage may vary, these are all simply suggestions of API tools in ruby.  
-M

On Tue, May 28, 2013 at 12:37 PM, Chandan Maheshwari  
[cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:

> Mike, What I meant by the "Other way" is any other cookbook or replacement  
> of gem right\_aws.
> 
> It seems to be standard cookbook, Joshua also recommended me "aws" cookbook  
> only.
> 
> On Tue, May 28, 2013 at 9:46 PM, Chandan Maheshwari  
> [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> 
> > Hi Mike,  
> > Thanks for pointing this out:
> > 
> > That looks to be a bug with the right\_aws gem that the aws cookbook  
> > depends on, and there is an open issue here:  
> > When can we expect it to get solved.
> > 
> > Is there any other way of doing this.
> > 
> > On Tue, May 28, 2013 at 9:44 PM, Chandan Maheshwari  
> > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > 
> > > Ohai,
> > > 
> > > What is the goal here? Are you trying to set up something for  
> > > autoscaling? Or are you just looking to register new nodes with an ELB?
> > > 
> > > ```
> > > I wanted to set up for autoscaling only.
> > > 
> > > ```
> > > 
> > > What is the difference b/w , "register a newly created node to ELB" vs setup  
> > > for autoscaling.
> > > 
> > > If you're doing autoscaling, I'd consider building a custom AMI for the  
> > > nodes that need to autoscale. I'd make that with the validation.pem and JSON  
> > > with the run list for the nodes you want, and also sets up chef-client to  
> > > run at launch or as a service.
> > > 
> > > ```
> > > Sorry but I didn't get actually the way
> > > 
> > > ```
> > > 
> > > to create AMI, also does it make any difference if every time I trigger to  
> > > use basic AMI and then apply my cookbooks on them and then register them  
> > > again to the ELB vs just use the AMI with runlist set as JSON and  
> > > chef-client to run as a service [except it would be a faster way]
> > > 
> > > If you just want to add nodes to an ELB, Opscode's "aws" cookbook has an  
> > > elastic\_lb resource, which you could use in your own cookbook. I'd assign  
> > > the ELB name as an attribute in the role for the node's in the role you want  
> > > to use, and then reference that attribute in the resource.
> > > 
> > > ```
> > > aws_elastic_lb 'my-load-balancer' do
> > > name node['aws']['load_balancer']
> > > aws_access_key aws['aws_access_key_id']
> > > aws_secret_access_key aws['aws_secret_access_key']
> > > end
> > > 
> > > I used that but it gives me below error:
> > > " Suppose my ELB is NAME
> > > 
> > > cookbook having recipe to register instance is
> > > 
> > > ```
> > > 
> > > cookbook\_name
> > > 
> > > FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME] (cookbook\_name::register  
> > > line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC is not  
> > > supported in this version of API. Please try 2011-11-15 or newer."
> > > 
> > > On Tue, May 28, 2013 at 9:34 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > > 
> > > > Chandan,
> > > > 
> > > > That looks to be a bug with the right\_aws gem that the aws cookbook  
> > > > depends on, and there is an open issue here:  
> > > > [Update to support 'InstanceProtocol' in the ELB API 2012-06-01 · Issue #146 · flexera-public/right\_aws · GitHub](https://github.com/rightscale/right_aws/issues/146)
> > > > 
> > > > I suspect is has to do with the case of ELB and VPC combination, and  
> > > > hopefully sometime that will get merged in and released, irrespective  
> > > > of Chef.
> > > > 
> > > > -M
> > > > 
> > > > On Tue, May 28, 2013 at 11:57 AM, Chandan Maheshwari  
> > > > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > > > 
> > > > > Thanks Mike for your prompt response.
> > > > > 
> > > > > I was just looking on the same cookbook and wrote once recipe(to  
> > > > > register my  
> > > > > ec2 instance), but it gave me error  
> > > > > Suppose,
> > > > > 
> > > > > my ELB is NAME  
> > > > > cookbook having recipe to register instance is cookbook\_name
> > > > > 
> > > > > FATAL: RightAws::AwsError: aws\_elastic\_lb[NAME]  
> > > > > (cookbook\_name::register  
> > > > > line 3) had an error: RightAws::AwsError: ValidationError: ELB in VPC  
> > > > > is not  
> > > > > supported in this version of API. Please try 2011-11-15 or newer.
> > > > > 
> > > > > On Tue, May 28, 2013 at 9:24 PM, Mike [miketheman@gmail.com](mailto:miketheman@gmail.com) wrote:
> > > > > 
> > > > > > Chandan,
> > > > > > 
> > > > > > You might want to look at the aws cookbook:  
> > > > > > [http://community.opscode.com/cookbooks/aws](http://community.opscode.com/cookbooks/aws)
> > > > > > 
> > > > > > For example, to register the node in the 'QA' ELB:
> > > > > > 
> > > > > > aws\_elastic\_lb "elb\_qa" do  
> > > > > > aws\_access\_key aws['aws\_access\_key\_id']  
> > > > > > aws\_secret\_access\_key aws['aws\_secret\_access\_key']  
> > > > > > name "QA"  
> > > > > > action :register  
> > > > > > end
> > > > > > 
> > > > > > -M
> > > > > > 
> > > > > > On Tue, May 28, 2013 at 9:27 AM, Chandan Maheshwari  
> > > > > > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) wrote:
> > > > > > 
> > > > > > > Hi All,
> > > > > > > 
> > > > > > > I want to attach an ec2 instance, once it is created using knife  
> > > > > > > ec2  
> > > > > > > plugin  
> > > > > > > and after applying my runlist to it, to the existing ELB I have.
> > > > > > > 
> > > > > > > How can I do this, is there any ready cookbook/LWRP for this. I  
> > > > > > > have one  
> > > > > > > very good solution to this, thanks to Ivan [which is working fine  
> > > > > > > and  
> > > > > > > creating the instances, attaching them to the ELB I provide] :
> > > > > > > 
> > > > > > > [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/)
> > > > > > > 
> > > > > > > but I don't want to create instance without using knife (and  
> > > > > > > manually  
> > > > > > > install chef-client and dependencies)
> > > > > > > 
> > > > > > > --  
> > > > > > > Thanks and Regards,  
> > > > > > > Chandan
> > > > > 
> > > > > --  
> > > > > Regards,  
> > > > > Chandan
> > > 
> > > --  
> > > Regards,  
> > > Chandan
> > 
> > --  
> > Regards,  
> > Chandan
> 
> --  
> Regards,  
> Chandan

---

<div class="post-metadata">

**Author:** ![nick\_hatch](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/nick_hatch/32/523_2.png) [@nick\_hatch](https://discourse.chef.io/u/nick_hatch)\
**Post date:** [May 29, 2013, 5:51am UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/10 "2013-05-29T05:51:54Z")

</div>

On Tue, May 28, 2013 at 9:16 AM, Chandan Maheshwari \<[cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com)

> wrote:

> Is there any other way of doing this.

Yes -- consider not doing it at all. While there may be valid reasons for  
taking this approach, I think it might be worthwhile to reevaluate the  
problem and see if you really need to use chef to manage your ELBs.

An alternative is to associate the ELB with the AS group, so that nodes  
automatically register. Use a robust health check @ the ELB so that nodes  
aren't routed traffic unless they can serve the requests successfully.  
(You'll want a good health check anyways so when things go bump in the  
cloud, unhealthy nodes aren't attempting to serve requests. )

I've had tens of thousands of instances go through this life-cycle and it  
works quite well.

AWS's tooling here is good and battle-tested. It seems that Chef's might  
not be. If it hurts to use your configuration management framework to  
manage your ELBs, perhaps you shouldn't do that.

There's also probably an argument to be made that introducing Chef as an  
actor in AS/ELB introduces some complexity around fate sharing that can be  
problematic if not done carefully.

-n

---

<div class="post-metadata">

**Author:** ![Chandan\_Maheshwari](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@Chandan\_Maheshwari](https://discourse.chef.io/u/Chandan_Maheshwari)\
**Post date:** [May 29, 2013, 8:03am UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/11 "2013-05-29T08:03:40Z")

</div>

Thanks Nick,

But I tried to search on AWS console and didn't found any way of  
attaching/associate AS with ELB. I then found a command line tool for  
autoscaling. Is this the same you are referring to use. In that case I have  
some doubts, as I have not used them much :

1. Can you please explain how to create AS group.
2. After step 1) how can I associate ELB with the AS group, again is it one  
time activity?
3. How the first instance (ec2 created using knife), will be associate with  
AS group or ELB?
4. Once the step 2 is done (AS is now associated with ELB), how the new  
nodes created (ec2 instances) will automatically have the AS group. I cant  
find any option with knife ec2 server create.

Chandan

On Wed, May 29, 2013 at 11:21 AM, nick hatch [nicholas.hatch@gmail.com](mailto:nicholas.hatch@gmail.com)wrote:

> On Tue, May 28, 2013 at 9:16 AM, Chandan Maheshwari \<  
> [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com)\> wrote:
> 
> > Is there any other way of doing this.
> 
> Yes -- consider not doing it at all. While there may be valid reasons for  
> taking this approach, I think it might be worthwhile to reevaluate the  
> problem and see if you really need to use chef to manage your ELBs.
> 
> An alternative is to associate the ELB with the AS group, so that nodes  
> automatically register. Use a robust health check @ the ELB so that nodes  
> aren't routed traffic unless they can serve the requests successfully.  
> (You'll want a good health check anyways so when things go bump in the  
> cloud, unhealthy nodes aren't attempting to serve requests. )
> 
> I've had tens of thousands of instances go through this life-cycle and it  
> works quite well.
> 
> AWS's tooling here is good and battle-tested. It seems that Chef's might  
> not be. If it hurts to use your configuration management framework to  
> manage your ELBs, perhaps you shouldn't do that.
> 
> There's also probably an argument to be made that introducing Chef as an  
> actor in AS/ELB introduces some complexity around fate sharing that can be  
> problematic if not done carefully.
> 
> -n

--  
Regards,  
Chandan

---

<div class="post-metadata">

**Author:** ![Chandan\_Maheshwari1](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@Chandan\_Maheshwari1](https://discourse.chef.io/u/Chandan_Maheshwari1)\
**Post date:** [May 30, 2013, 8:26am UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/12 "2013-05-30T08:26:07Z")

</div>

Hi,

I am able to create AS config and then AS group and then create instances  
in AS group which in turn gets attached to ELB. But that is all using  
command line tool that I took from :  
[http://aws.amazon.com/developertools/2535](http://aws.amazon.com/developertools/2535)

In this case following  
[Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/) it  
is doing the job. But in this case steps like creation of instance,  
chef-client installation, registering to chef-server, running run\_list, is  
performed using user-data script. I am basically not using knife-ec2 plugin.

How can I achieve those tasks pointed in my last email(creation of AS group  
and then attaching it to ELB), using knife-ec2 plugin or using some other  
API cooking inside my cookbook/recipe.

Is there any API or gem like right\_aws? [which may support ELB and VPC both]

On Wed, May 29, 2013 at 1:33 PM, Chandan Maheshwari \<[cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com)

> wrote:

> Thanks Nick,
> 
> But I tried to search on AWS console and didn't found any way of  
> attaching/associate AS with ELB. I then found a command line tool for  
> autoscaling. Is this the same you are referring to use. In that case I have  
> some doubts, as I have not used them much :
> 
> 1. Can you please explain how to create AS group.
> 2. After step 1) how can I associate ELB with the AS group, again is it  
> one time activity?
> 3. How the first instance (ec2 created using knife), will be associate  
> with AS group or ELB?
> 4. Once the step 2 is done (AS is now associated with ELB), how the new  
> nodes created (ec2 instances) will automatically have the AS group. I cant  
> find any option with knife ec2 server create.
> 
> Chandan
> 
> On Wed, May 29, 2013 at 11:21 AM, nick hatch [nicholas.hatch@gmail.com](mailto:nicholas.hatch@gmail.com)wrote:
> 
> > On Tue, May 28, 2013 at 9:16 AM, Chandan Maheshwari \<  
> > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com)\> wrote:
> > 
> > > Is there any other way of doing this.
> > 
> > Yes -- consider not doing it at all. While there may be valid reasons  
> > for taking this approach, I think it might be worthwhile to reevaluate the  
> > problem and see if you really need to use chef to manage your ELBs.
> > 
> > An alternative is to associate the ELB with the AS group, so that nodes  
> > automatically register. Use a robust health check @ the ELB so that nodes  
> > aren't routed traffic unless they can serve the requests successfully.  
> > (You'll want a good health check anyways so when things go bump in the  
> > cloud, unhealthy nodes aren't attempting to serve requests. )
> > 
> > I've had tens of thousands of instances go through this life-cycle and it  
> > works quite well.
> > 
> > AWS's tooling here is good and battle-tested. It seems that Chef's might  
> > not be. If it hurts to use your configuration management framework to  
> > manage your ELBs, perhaps you shouldn't do that.
> > 
> > There's also probably an argument to be made that introducing Chef as an  
> > actor in AS/ELB introduces some complexity around fate sharing that can be  
> > problematic if not done carefully.
> > 
> > -n
> 
> --  
> Regards,  
> Chandan

--  
Chandan Maheshwari,  
Cloud Softwate Engineer, Clogeny Technologies,  
[http://clogeny.com](http://clogeny.com)  
(M) 0091-8956541752  
Skype: chandan.maheshwari16

---

<div class="post-metadata">

**Author:** ![Morgan\_Blackthorne](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/morgan_blackthorne/32/100_2.png) [@Morgan\_Blackthorne](https://discourse.chef.io/u/Morgan_Blackthorne)\
**Post date:** [May 30, 2013, 11:46am UTC](https://discourse.chef.io/t/attach-an-ec2-instance-on-the-existing-elb/4025/13 "2013-05-30T11:46:41Z")

</div>

I would look at elasticbeanstalk if it can support your needs; integrating  
chef with EB makes things easy to manage and Amazon does the heavy lifting  
on the EC2/ELB side of the equation. Bear in mind you can migrate the  
ElasticBeanstalk config to an Ubuntu AMI (that's what I'm doing for Rosetta  
Stone). Not necessarily easily, but doable.

On Thursday, May 30, 2013, Chandan Maheshwari wrote:

> Hi,
> 
> I am able to create AS config and then AS group and then create instances  
> in AS group which in turn gets attached to ELB. But that is all using  
> command line tool that I took from :  
> [autoscaling — AWS CLI 2.32.3 Command Reference](http://aws.amazon.com/developertools/2535)
> 
> In this case following  
> [Auto-scaling on Amazon EC2 with Opscode Chef - Ivan-Site.com](http://ivan-site.com/2013/02/auto-scaling-on-amazon-ec2-with-opscode-chef/) it  
> is doing the job. But in this case steps like creation of instance,  
> chef-client installation, registering to chef-server, running run\_list, is  
> performed using user-data script. I am basically not using knife-ec2 plugin.
> 
> How can I achieve those tasks pointed in my last email(creation of AS  
> group and then attaching it to ELB), using knife-ec2 plugin or using some  
> other API cooking inside my cookbook/recipe.
> 
> Is there any API or gem like right\_aws? [which may support ELB and VPC  
> both]
> 
> On Wed, May 29, 2013 at 1:33 PM, Chandan Maheshwari \<  
> [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) \<javascript:\_e({}, 'cvml',  
> 'cmaheshwari16@gmail.com');\>\> wrote:
> 
> > Thanks Nick,
> > 
> > But I tried to search on AWS console and didn't found any way of  
> > attaching/associate AS with ELB. I then found a command line tool for  
> > autoscaling. Is this the same you are referring to use. In that case I have  
> > some doubts, as I have not used them much :
> > 
> > 1. Can you please explain how to create AS group.
> > 2. After step 1) how can I associate ELB with the AS group, again is it  
> > one time activity?
> > 3. How the first instance (ec2 created using knife), will be associate  
> > with AS group or ELB?
> > 4. Once the step 2 is done (AS is now associated with ELB), how the new  
> > nodes created (ec2 instances) will automatically have the AS group. I cant  
> > find any option with knife ec2 server create.
> > 
> > Chandan
> > 
> > On Wed, May 29, 2013 at 11:21 AM, nick hatch \<[nicholas.hatch@gmail.com](mailto:nicholas.hatch@gmail.com)\<javascript:\_e({}, 'cvml', 'nicholas.hatch@gmail.com');\>
> > 
> > > wrote:
> > 
> > > On Tue, May 28, 2013 at 9:16 AM, Chandan Maheshwari \<  
> > > [cmaheshwari16@gmail.com](mailto:cmaheshwari16@gmail.com) \<javascript:\_e({}, 'cvml',  
> > > 'cmaheshwari16@gmail.com');\>\> wrote:
> > > 
> > > > Is there any other way of doing this.
> > > 
> > > Yes -- consider not doing it at all. While there may be valid reasons  
> > > for taking this approach, I think it might be worthwhile to reevaluate the  
> > > problem and see if you really need to use chef to manage your ELBs.
> > > 
> > > An alternative is to associate the ELB with the AS group, so that nodes  
> > > automatically register. Use a robust health check @ the ELB so that nodes  
> > > aren't routed traffic unless they can serve the requests successfully.  
> > > (You'll want a good health check anyways so when things go bump in the  
> > > cloud, unhealthy nodes aren't attempting to serve requests. )
> > > 
> > > I've had tens of thousands of instances go through this life-cycle and  
> > > it works quite well.
> > > 
> > > AWS's tooling here is good and battle-tested. It seems that Chef's might  
> > > not be. If it hurts to use your configuration management framework to  
> > > manage your ELBs, perhaps you shouldn't do that.
> > > 
> > > There's also probably an argument to be made that introducing Chef as an  
> > > actor in AS/ELB introduces some complexity around fate sharing that can be  
> > > problematic if not done carefully.
> > > 
> > > -n
> > 
> > --  
> > Regards,  
> > Chandan
> 
> --  
> Chandan Maheshwari,  
> Cloud Softwate Engineer, Clogeny Technologies,  
> [http://clogeny.com](http://clogeny.com)  
> (M) 0091-8956541752  
> Skype: chandan.maheshwari16

## --

~_~ StormeRider ~_~

"Every world needs its heroes [...] They inspire us to be better than we  
are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... [http://bit.ly/Ps3uSS](http://bit.ly/Ps3uSS)
