Will my running EC2 instance drop its current public IP if I associate an Elastic IP to it?











up vote
0
down vote

favorite












I am running an EC2 instance with a public IP. This IP is not elastic, so if I were to restart the instance, I would lose it.



When I created the instance, I did not know about this, so I configured my domain name to point to that IP as if it were set in stone.



Now I realized that I risk that my app be unreachable if the IP changes after a restart.



What would the correct procedure to assign an Elastic IP to this instance without downtime?










share|improve this question


























    up vote
    0
    down vote

    favorite












    I am running an EC2 instance with a public IP. This IP is not elastic, so if I were to restart the instance, I would lose it.



    When I created the instance, I did not know about this, so I configured my domain name to point to that IP as if it were set in stone.



    Now I realized that I risk that my app be unreachable if the IP changes after a restart.



    What would the correct procedure to assign an Elastic IP to this instance without downtime?










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am running an EC2 instance with a public IP. This IP is not elastic, so if I were to restart the instance, I would lose it.



      When I created the instance, I did not know about this, so I configured my domain name to point to that IP as if it were set in stone.



      Now I realized that I risk that my app be unreachable if the IP changes after a restart.



      What would the correct procedure to assign an Elastic IP to this instance without downtime?










      share|improve this question













      I am running an EC2 instance with a public IP. This IP is not elastic, so if I were to restart the instance, I would lose it.



      When I created the instance, I did not know about this, so I configured my domain name to point to that IP as if it were set in stone.



      Now I realized that I risk that my app be unreachable if the IP changes after a restart.



      What would the correct procedure to assign an Elastic IP to this instance without downtime?







      amazon-web-services amazon-ec2 elastic-ip






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 22 at 10:14









      Salvatore Iovene

      457311




      457311
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          There will be not that much of downtime. it will be a couple of secs. just get the new ElasticIP and point the DNS to new. Or if you want to do without Downtime, Then plan to add Loadbalancer with your instance and point the domain to Loadbalancer. there will be no downtime






          share|improve this answer





















          • Won't there be downtime while the DNS change propagates?
            – Salvatore Iovene
            Nov 23 at 12:12










          • No, Becuase your old DNS and NEW DNS are pointing to the same server. Only Diff will be earlier it was on EC2 now it will be LB. Rest will be the same.
            – AnmolNagpal
            Nov 23 at 13:58










          • Thanks, my question was related to just changing the DNS without a LB. But I understand now how I could do it with no downtime using a LB. Thanks!
            – Salvatore Iovene
            Nov 23 at 20:57


















          up vote
          0
          down vote













          The public IP which is auto assigned to your instance will change once you restart/stop n start your instance. Creation and assigning of the Elastic IP wont cause any issue but the domain name configuration will have to be changed. the domain name configuration was done through AWS or any other service providers?






          share|improve this answer





















          • It's done via Cloudflare. I can set a very short TTL (I think the shortest is 1 or 2 minutes) and that should limit the downtime to 2 minutes, I think.
            – Salvatore Iovene
            Nov 23 at 12:13











          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%2f53428610%2fwill-my-running-ec2-instance-drop-its-current-public-ip-if-i-associate-an-elasti%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



          accepted










          There will be not that much of downtime. it will be a couple of secs. just get the new ElasticIP and point the DNS to new. Or if you want to do without Downtime, Then plan to add Loadbalancer with your instance and point the domain to Loadbalancer. there will be no downtime






          share|improve this answer





















          • Won't there be downtime while the DNS change propagates?
            – Salvatore Iovene
            Nov 23 at 12:12










          • No, Becuase your old DNS and NEW DNS are pointing to the same server. Only Diff will be earlier it was on EC2 now it will be LB. Rest will be the same.
            – AnmolNagpal
            Nov 23 at 13:58










          • Thanks, my question was related to just changing the DNS without a LB. But I understand now how I could do it with no downtime using a LB. Thanks!
            – Salvatore Iovene
            Nov 23 at 20:57















          up vote
          1
          down vote



          accepted










          There will be not that much of downtime. it will be a couple of secs. just get the new ElasticIP and point the DNS to new. Or if you want to do without Downtime, Then plan to add Loadbalancer with your instance and point the domain to Loadbalancer. there will be no downtime






          share|improve this answer





















          • Won't there be downtime while the DNS change propagates?
            – Salvatore Iovene
            Nov 23 at 12:12










          • No, Becuase your old DNS and NEW DNS are pointing to the same server. Only Diff will be earlier it was on EC2 now it will be LB. Rest will be the same.
            – AnmolNagpal
            Nov 23 at 13:58










          • Thanks, my question was related to just changing the DNS without a LB. But I understand now how I could do it with no downtime using a LB. Thanks!
            – Salvatore Iovene
            Nov 23 at 20:57













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          There will be not that much of downtime. it will be a couple of secs. just get the new ElasticIP and point the DNS to new. Or if you want to do without Downtime, Then plan to add Loadbalancer with your instance and point the domain to Loadbalancer. there will be no downtime






          share|improve this answer












          There will be not that much of downtime. it will be a couple of secs. just get the new ElasticIP and point the DNS to new. Or if you want to do without Downtime, Then plan to add Loadbalancer with your instance and point the domain to Loadbalancer. there will be no downtime







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 at 11:43









          AnmolNagpal

          1246




          1246












          • Won't there be downtime while the DNS change propagates?
            – Salvatore Iovene
            Nov 23 at 12:12










          • No, Becuase your old DNS and NEW DNS are pointing to the same server. Only Diff will be earlier it was on EC2 now it will be LB. Rest will be the same.
            – AnmolNagpal
            Nov 23 at 13:58










          • Thanks, my question was related to just changing the DNS without a LB. But I understand now how I could do it with no downtime using a LB. Thanks!
            – Salvatore Iovene
            Nov 23 at 20:57


















          • Won't there be downtime while the DNS change propagates?
            – Salvatore Iovene
            Nov 23 at 12:12










          • No, Becuase your old DNS and NEW DNS are pointing to the same server. Only Diff will be earlier it was on EC2 now it will be LB. Rest will be the same.
            – AnmolNagpal
            Nov 23 at 13:58










          • Thanks, my question was related to just changing the DNS without a LB. But I understand now how I could do it with no downtime using a LB. Thanks!
            – Salvatore Iovene
            Nov 23 at 20:57
















          Won't there be downtime while the DNS change propagates?
          – Salvatore Iovene
          Nov 23 at 12:12




          Won't there be downtime while the DNS change propagates?
          – Salvatore Iovene
          Nov 23 at 12:12












          No, Becuase your old DNS and NEW DNS are pointing to the same server. Only Diff will be earlier it was on EC2 now it will be LB. Rest will be the same.
          – AnmolNagpal
          Nov 23 at 13:58




          No, Becuase your old DNS and NEW DNS are pointing to the same server. Only Diff will be earlier it was on EC2 now it will be LB. Rest will be the same.
          – AnmolNagpal
          Nov 23 at 13:58












          Thanks, my question was related to just changing the DNS without a LB. But I understand now how I could do it with no downtime using a LB. Thanks!
          – Salvatore Iovene
          Nov 23 at 20:57




          Thanks, my question was related to just changing the DNS without a LB. But I understand now how I could do it with no downtime using a LB. Thanks!
          – Salvatore Iovene
          Nov 23 at 20:57












          up vote
          0
          down vote













          The public IP which is auto assigned to your instance will change once you restart/stop n start your instance. Creation and assigning of the Elastic IP wont cause any issue but the domain name configuration will have to be changed. the domain name configuration was done through AWS or any other service providers?






          share|improve this answer





















          • It's done via Cloudflare. I can set a very short TTL (I think the shortest is 1 or 2 minutes) and that should limit the downtime to 2 minutes, I think.
            – Salvatore Iovene
            Nov 23 at 12:13















          up vote
          0
          down vote













          The public IP which is auto assigned to your instance will change once you restart/stop n start your instance. Creation and assigning of the Elastic IP wont cause any issue but the domain name configuration will have to be changed. the domain name configuration was done through AWS or any other service providers?






          share|improve this answer





















          • It's done via Cloudflare. I can set a very short TTL (I think the shortest is 1 or 2 minutes) and that should limit the downtime to 2 minutes, I think.
            – Salvatore Iovene
            Nov 23 at 12:13













          up vote
          0
          down vote










          up vote
          0
          down vote









          The public IP which is auto assigned to your instance will change once you restart/stop n start your instance. Creation and assigning of the Elastic IP wont cause any issue but the domain name configuration will have to be changed. the domain name configuration was done through AWS or any other service providers?






          share|improve this answer












          The public IP which is auto assigned to your instance will change once you restart/stop n start your instance. Creation and assigning of the Elastic IP wont cause any issue but the domain name configuration will have to be changed. the domain name configuration was done through AWS or any other service providers?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 at 11:20









          kavya sudeep

          4




          4












          • It's done via Cloudflare. I can set a very short TTL (I think the shortest is 1 or 2 minutes) and that should limit the downtime to 2 minutes, I think.
            – Salvatore Iovene
            Nov 23 at 12:13


















          • It's done via Cloudflare. I can set a very short TTL (I think the shortest is 1 or 2 minutes) and that should limit the downtime to 2 minutes, I think.
            – Salvatore Iovene
            Nov 23 at 12:13
















          It's done via Cloudflare. I can set a very short TTL (I think the shortest is 1 or 2 minutes) and that should limit the downtime to 2 minutes, I think.
          – Salvatore Iovene
          Nov 23 at 12:13




          It's done via Cloudflare. I can set a very short TTL (I think the shortest is 1 or 2 minutes) and that should limit the downtime to 2 minutes, I think.
          – Salvatore Iovene
          Nov 23 at 12:13


















          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%2f53428610%2fwill-my-running-ec2-instance-drop-its-current-public-ip-if-i-associate-an-elasti%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

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

          Calculate evaluation metrics using cross_val_predict sklearn

          Insert data from modal to MySQL (multiple modal on website)