ec2 instance type change

1

if my instance is running! can i change instance type or is there is any way for auto scaling and if there is a way how to do that?

preguntada hace un año5611 visualizaciones
3 Respuestas
2

If you're using the console:

  1. Stop the instance by selecting it then go to the "Instance state" menu and choose "Stop instance". Note that this doesn't terminate (delete) the instance, it only shuts it down.
  2. Change the instance type in the "Actions" menu by choosing "Instance settings" and then "Change instance type".
  3. Restart the instance from the "Instance state" menu by choosing "Start instance".

This is commonly known as "vertical scaling" - changing the size of the instance to be larger or smaller. Horizontal scaling adds (and removes) instances from the fleet which is done using auto-scaling.

profile pictureAWS
EXPERTO
respondido hace un año
  • Quick note since AutoScaling was mentioned: If the instance is in an ASG, there is a strong chance the ASG will see the instance as no longer running and terminate/replace it (unless the stop/start is very fast with lucky timing)

  • Thanks, my linux server got stuck, and this method helped to relieve, upgrade and restart server

0

First part of your question, the answer would be no, because if you go "Action" menu, the drop dwon menu "Change instance type" is deemed.

Before configuring "Auto Scaling Groups", you need to configure "Target Groups", if the instance is "Stopped" state you will not see any instance on the "Target Groups" console.

With my understanding, first you stop the instance, change the instance type, restart the instance and configure the "Target Groups" as well as "Auto Scaling Groups". But you can attach the instance when it is running, if you have any auto scaling group. Look if you have load balancer - the answer would be different.

Every question has its own merit, and explanation.

Please do not forget to update your public IP address (in case of auto enabled IP) in Route 53, if your instance has any website configuration after restarting.

I am sorry to mention, please create a snapshot, before you do any changes.

respondido hace un año
0

EC2 AutoScaling is designed for horizontal scaling (adding and removing instances), not vertical scaling (changing the size of existing instances). EC2 doesn't support updating the instance size for a running instance, so it has to be stopped to change the size. Do NOT stop an instance in an AutoScaling Group (ASG), or it will most likley end up being marked as unhealthy and replaced (terminated).

If you aren't using an ASG and want to vertically scale, here's an example solution for it (but there is downtime for the stop/start) https://aws.amazon.com/blogs/architecture/aws-ops-automator-v2-features-vertical-scaling-preview/

AWS
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