How can I add an instance manually to Elastic Beanstalk environment that uses the same application stack?


Hi, I need to add a separate load balancer and instance to an existing elastic beanstalk environment. I can add these manually no problem, but how do I make sure the manually added instance is configured / installed the same application stack that is in the EB environment (e.g. nodeJS + the application zip file)?

Where is the EB configuration that ensures this?


asked a year ago756 views
2 Answers

If you only think to add an similar instance of your existing instance on beanstalk environment, you may create a snapshot of the existing instance of your environment. Select the existing EC2 and create a snapshot of the EC2. Select the snapshot, and create an image from the snapshot, under the Actons menu.

Click AMI under the Image on Dashboard and you will see your newly created image on top of the page. Select the image and click Launch instance from AMI, now you will go to "Launch an instance" configure as per your requirements, such as VPC, OS, instance type, subnet and availability zone.

Second option: You can create an instance and replace its root volume with the snapshot.

I do not know how you will configure target group, auto scaling - it is up to you. To test the newly EC2 created from the image, you can stop the old instance (be careful with your auto scaling, which may create a new one, I hope you know, how the target group, and auto scaling group works). If you configure DNS and hosted zone with the new EC2, you will find the website is working. The other checking you can use the command (Linux commnad) of your newly created EC2, such what kind of file/folder you have on your EC2.

You can also visit:

Please advise me whther this information came any help to you. Thnaks.

answered a year ago
  • Thanks, interesting way to replicate the original instance, however the issue is any time an update is rolled out, I would have to manually re-image the original instance. I think what I need is to find the cloud formation stack for the elastic beanstalk environment and introduce these new load balancer, target group and instances. That way when a new update is pushed the new instance(s) are also updated.

    I wish EB had an open source infrastructure as code recipe that can be easily extended.


Excellent! Thank you to come back with your solutions.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions