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?

질문됨 일 년 전6077회 조회
3개 답변
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
전문가
답변함 일 년 전
  • 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.

답변함 일 년 전
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠