Search code examples
amazon-web-servicesamazon-ec2amazon-ec2-spot-market

Will spot service start a manually stopped spot instance


I'm aware that the spot service will manage a spot instance and stop or start it based on whether the price matches or capacity is available as per https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#specifying-spot-interruption-behavior

And https://aws.amazon.com/about-aws/whats-new/2020/01/amazon-ec2-spot-instances-stopped-started-similar-to-on-demand-instances/ mentions now it's possible to manually stop or start a spot instance. I'm confused if I stop a spot instance manually, will the spot service start it again whenever the price/capacity requirements are met? Or would it stop monitoring the instance till I manually start the spot instance again?


Solution

  • To answer your question, there are 2 kinds of request. 1) one time request 2) persistent request.

    one-time-request:- manually you can only terminate instance, you cannot stop it.Once you terminate instance the request goes away.

    persistent-request:- In case of persistent request, it will automatically launch an instance when you manually terminate the instance, but if you stop it manually then you need to manually start it again. spot instance will not start for you automatically.docs

    If the request is persistent, the request is opened again after your Spot Instance is interrupted( interruption by aws). If the request is persistent and you stop your Spot Instance, the request only opens after you start your Spot Instance.

    Please NOTE

    You can only stop/ start instance which is launched from persistent request and which not a part of fleet or launch group, Availability Zone group, or Spot block. docs when you stop the instance the request goes into disabled state.