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












0















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



























    0















    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

























      0












      0








      0








      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 '18 at 10:14









      Salvatore IoveneSalvatore Iovene

      460311




      460311
























          2 Answers
          2






          active

          oldest

          votes


















          1














          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 '18 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 '18 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 '18 at 20:57



















          0














          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 '18 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',
          autoActivateHeartbeat: false,
          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









          1














          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 '18 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 '18 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 '18 at 20:57
















          1














          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 '18 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 '18 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 '18 at 20:57














          1












          1








          1







          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 '18 at 11:43









          AnmolNagpalAnmolNagpal

          1337




          1337













          • Won't there be downtime while the DNS change propagates?

            – Salvatore Iovene
            Nov 23 '18 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 '18 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 '18 at 20:57



















          • Won't there be downtime while the DNS change propagates?

            – Salvatore Iovene
            Nov 23 '18 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 '18 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 '18 at 20:57

















          Won't there be downtime while the DNS change propagates?

          – Salvatore Iovene
          Nov 23 '18 at 12:12





          Won't there be downtime while the DNS change propagates?

          – Salvatore Iovene
          Nov 23 '18 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 '18 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 '18 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 '18 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 '18 at 20:57













          0














          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 '18 at 12:13
















          0














          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 '18 at 12:13














          0












          0








          0







          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 '18 at 11:20









          kavya sudeepkavya sudeep

          6




          6













          • 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 '18 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 '18 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 '18 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 '18 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.




          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







          這個網誌中的熱門文章

          Xamarin.form Move up view when keyboard appear

          Post-Redirect-Get with Spring WebFlux and Thymeleaf

          Anylogic : not able to use stopDelay()