Change interruption behavior of fulfilled AWS spot request











up vote
1
down vote

favorite












Before knowing exactly how AWS spot instances work I configured a spot request with the interruption behavior set to terminate. As I understand it my running instance state will be deleted on termination. So if I don't have an image backup I will not be able to start the server again in it's last state.



Since the spot request is fulfilled and the instance running, is it possible to change the interruption behavior to stop when I am outbid? I cant seem to find the option to change the interruption behavior.










share|improve this question


























    up vote
    1
    down vote

    favorite












    Before knowing exactly how AWS spot instances work I configured a spot request with the interruption behavior set to terminate. As I understand it my running instance state will be deleted on termination. So if I don't have an image backup I will not be able to start the server again in it's last state.



    Since the spot request is fulfilled and the instance running, is it possible to change the interruption behavior to stop when I am outbid? I cant seem to find the option to change the interruption behavior.










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Before knowing exactly how AWS spot instances work I configured a spot request with the interruption behavior set to terminate. As I understand it my running instance state will be deleted on termination. So if I don't have an image backup I will not be able to start the server again in it's last state.



      Since the spot request is fulfilled and the instance running, is it possible to change the interruption behavior to stop when I am outbid? I cant seem to find the option to change the interruption behavior.










      share|improve this question













      Before knowing exactly how AWS spot instances work I configured a spot request with the interruption behavior set to terminate. As I understand it my running instance state will be deleted on termination. So if I don't have an image backup I will not be able to start the server again in it's last state.



      Since the spot request is fulfilled and the instance running, is it possible to change the interruption behavior to stop when I am outbid? I cant seem to find the option to change the interruption behavior.







      amazon-web-services amazon-ec2






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 at 7:25









      Rynardt

      4,09062241




      4,09062241
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          According to boto3 Spot instance creation documentation, you may also instruct the instance to stop or hibernate if you set the instance type to persistent. The default behaviour is terminate. This features is added in November 2017.



          response = client.request_spot_fleet(
          SpotFleetRequestConfig={
          .....
          Type='one-time'|'persistent',
          'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
          }


          Use them sparingly as each behaviour has some pros and cons, e.g. you must take care of process network connection interruption if yo use hibernate. For stop, you may want to store data into another mounted EBS.






          share|improve this answer























          • Can I change the instance type from one time to persistent without terminating the spot instance?
            – Rynardt
            Nov 22 at 9:27






          • 1




            @Rynardt Well, you didn't see the option inside AWS Console, it means it is not changeable at the moment.
            – mootmoot
            Nov 22 at 9:44


















          up vote
          1
          down vote













          For setting the interruption behavior to stop, we need to take care of some requirements:




          • For a Spot Instance request, the type must be persistent, not
            one-time. You cannot specify a launch group in the Spot Instance
            request.

          • For a Spot Fleet request, the type must be maintain, not request.

          • The root volume must be an EBS volume, not an instance store volume.


          by following the above requirements, we can change the interruption behavior from terminate to stop.



          Please refer the following url for reference:
          https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html






          share|improve this answer





















          • My Spot Instance request is currently one-time and not persistent. How do I change it without terminating the running instance?
            – Rynardt
            Nov 22 at 9:26











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53425796%2fchange-interruption-behavior-of-fulfilled-aws-spot-request%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          According to boto3 Spot instance creation documentation, you may also instruct the instance to stop or hibernate if you set the instance type to persistent. The default behaviour is terminate. This features is added in November 2017.



          response = client.request_spot_fleet(
          SpotFleetRequestConfig={
          .....
          Type='one-time'|'persistent',
          'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
          }


          Use them sparingly as each behaviour has some pros and cons, e.g. you must take care of process network connection interruption if yo use hibernate. For stop, you may want to store data into another mounted EBS.






          share|improve this answer























          • Can I change the instance type from one time to persistent without terminating the spot instance?
            – Rynardt
            Nov 22 at 9:27






          • 1




            @Rynardt Well, you didn't see the option inside AWS Console, it means it is not changeable at the moment.
            – mootmoot
            Nov 22 at 9:44















          up vote
          1
          down vote













          According to boto3 Spot instance creation documentation, you may also instruct the instance to stop or hibernate if you set the instance type to persistent. The default behaviour is terminate. This features is added in November 2017.



          response = client.request_spot_fleet(
          SpotFleetRequestConfig={
          .....
          Type='one-time'|'persistent',
          'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
          }


          Use them sparingly as each behaviour has some pros and cons, e.g. you must take care of process network connection interruption if yo use hibernate. For stop, you may want to store data into another mounted EBS.






          share|improve this answer























          • Can I change the instance type from one time to persistent without terminating the spot instance?
            – Rynardt
            Nov 22 at 9:27






          • 1




            @Rynardt Well, you didn't see the option inside AWS Console, it means it is not changeable at the moment.
            – mootmoot
            Nov 22 at 9:44













          up vote
          1
          down vote










          up vote
          1
          down vote









          According to boto3 Spot instance creation documentation, you may also instruct the instance to stop or hibernate if you set the instance type to persistent. The default behaviour is terminate. This features is added in November 2017.



          response = client.request_spot_fleet(
          SpotFleetRequestConfig={
          .....
          Type='one-time'|'persistent',
          'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
          }


          Use them sparingly as each behaviour has some pros and cons, e.g. you must take care of process network connection interruption if yo use hibernate. For stop, you may want to store data into another mounted EBS.






          share|improve this answer














          According to boto3 Spot instance creation documentation, you may also instruct the instance to stop or hibernate if you set the instance type to persistent. The default behaviour is terminate. This features is added in November 2017.



          response = client.request_spot_fleet(
          SpotFleetRequestConfig={
          .....
          Type='one-time'|'persistent',
          'InstanceInterruptionBehavior': 'hibernate'|'stop'|'terminate'
          }


          Use them sparingly as each behaviour has some pros and cons, e.g. you must take care of process network connection interruption if yo use hibernate. For stop, you may want to store data into another mounted EBS.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 22 at 8:28

























          answered Nov 22 at 8:23









          mootmoot

          5,92822034




          5,92822034












          • Can I change the instance type from one time to persistent without terminating the spot instance?
            – Rynardt
            Nov 22 at 9:27






          • 1




            @Rynardt Well, you didn't see the option inside AWS Console, it means it is not changeable at the moment.
            – mootmoot
            Nov 22 at 9:44


















          • Can I change the instance type from one time to persistent without terminating the spot instance?
            – Rynardt
            Nov 22 at 9:27






          • 1




            @Rynardt Well, you didn't see the option inside AWS Console, it means it is not changeable at the moment.
            – mootmoot
            Nov 22 at 9:44
















          Can I change the instance type from one time to persistent without terminating the spot instance?
          – Rynardt
          Nov 22 at 9:27




          Can I change the instance type from one time to persistent without terminating the spot instance?
          – Rynardt
          Nov 22 at 9:27




          1




          1




          @Rynardt Well, you didn't see the option inside AWS Console, it means it is not changeable at the moment.
          – mootmoot
          Nov 22 at 9:44




          @Rynardt Well, you didn't see the option inside AWS Console, it means it is not changeable at the moment.
          – mootmoot
          Nov 22 at 9:44












          up vote
          1
          down vote













          For setting the interruption behavior to stop, we need to take care of some requirements:




          • For a Spot Instance request, the type must be persistent, not
            one-time. You cannot specify a launch group in the Spot Instance
            request.

          • For a Spot Fleet request, the type must be maintain, not request.

          • The root volume must be an EBS volume, not an instance store volume.


          by following the above requirements, we can change the interruption behavior from terminate to stop.



          Please refer the following url for reference:
          https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html






          share|improve this answer





















          • My Spot Instance request is currently one-time and not persistent. How do I change it without terminating the running instance?
            – Rynardt
            Nov 22 at 9:26















          up vote
          1
          down vote













          For setting the interruption behavior to stop, we need to take care of some requirements:




          • For a Spot Instance request, the type must be persistent, not
            one-time. You cannot specify a launch group in the Spot Instance
            request.

          • For a Spot Fleet request, the type must be maintain, not request.

          • The root volume must be an EBS volume, not an instance store volume.


          by following the above requirements, we can change the interruption behavior from terminate to stop.



          Please refer the following url for reference:
          https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html






          share|improve this answer





















          • My Spot Instance request is currently one-time and not persistent. How do I change it without terminating the running instance?
            – Rynardt
            Nov 22 at 9:26













          up vote
          1
          down vote










          up vote
          1
          down vote









          For setting the interruption behavior to stop, we need to take care of some requirements:




          • For a Spot Instance request, the type must be persistent, not
            one-time. You cannot specify a launch group in the Spot Instance
            request.

          • For a Spot Fleet request, the type must be maintain, not request.

          • The root volume must be an EBS volume, not an instance store volume.


          by following the above requirements, we can change the interruption behavior from terminate to stop.



          Please refer the following url for reference:
          https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html






          share|improve this answer












          For setting the interruption behavior to stop, we need to take care of some requirements:




          • For a Spot Instance request, the type must be persistent, not
            one-time. You cannot specify a launch group in the Spot Instance
            request.

          • For a Spot Fleet request, the type must be maintain, not request.

          • The root volume must be an EBS volume, not an instance store volume.


          by following the above requirements, we can change the interruption behavior from terminate to stop.



          Please refer the following url for reference:
          https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 at 8:54









          Dharmesh Purohit

          963




          963












          • My Spot Instance request is currently one-time and not persistent. How do I change it without terminating the running instance?
            – Rynardt
            Nov 22 at 9:26


















          • My Spot Instance request is currently one-time and not persistent. How do I change it without terminating the running instance?
            – Rynardt
            Nov 22 at 9:26
















          My Spot Instance request is currently one-time and not persistent. How do I change it without terminating the running instance?
          – Rynardt
          Nov 22 at 9:26




          My Spot Instance request is currently one-time and not persistent. How do I change it without terminating the running instance?
          – Rynardt
          Nov 22 at 9:26


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53425796%2fchange-interruption-behavior-of-fulfilled-aws-spot-request%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          What visual should I use to simply compare current year value vs last year in Power BI desktop

          How to ignore python UserWarning in pytest?

          Alexandru Averescu