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

0

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?

Thanks

preguntada hace un año716 visualizaciones
2 Respuestas
1

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: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.EditConfig.html

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

respondido hace un año
  • 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.

0

Excellent! Thank you to come back with your solutions.

respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas