Schedule the change of an EC2 instance type

0

Is there a way to pre-configure an instance type change for an EC2 instance so it happens automatically after the next reboot? Kind of like changes to RDS can set to be executed at the next maintenance interval. The instances are not in an Autoscaler group and they're all one-of-a-kind, various types / AMIs / OSs and whatnot... a CLI option would be amazing, but if I have to click through all of them, so be it.

Thanks, Marc

Marc
demandé il y a un an294 vues
1 réponse
2
Réponse acceptée

I would consider using an AWS Systems Manager (SSM) Automation to call the EC2 API and update the instance type. For scheduling, you could use EventBridge Scheduler with a one-time schedule (it also supports a flexible window). SSM also has a few native scheduling options.

You can use the AWS provided AWS-ResizeInstance automation, or copy it and create your own one. The SSM document will use the aws:executeAwsApi action to call ModifyInstanceAttribute. The main benefit using SSM is that you can ensure it stops the instance, modifies starts etc. and check for errors. Again, the AWS provided one is a good start and might suffice.

AWS
EXPERT
Raphael
répondu il y a un an
  • Thanks Raphael, much appreciated! :)

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions