If I move an Elastic IP from one EC2 instance to another, does it happen instantly?

I am asking this question, as I have a situation where I have a website hosted within Elastic Beanstalk without a load balancer. Therefore my Route53 is configured so that my domain is pointing directly to the Elastic IP of my EC2 instance. Thus, I can't do the normal CNAME swap as suggested.

Now, I have looked at the pricing of the Elastic Load Balancer and don't have a requirement for it because my site doesn't receive enough traffic to warrant it. However, I do have a requirement to be able to release new versions of the site without down time and without adversely affecting users by having to wait for settings to propagate 'through the internet' so it were.

I was told that it is possible to reassign Elastic IP addresses, so what I thought was that I could do the following, when releasing a new version of my website:

  1. Create a new EC2 instance
  2. Deploy the new version of the application to the new EC2 instance
  3. Check that the new version is working on the new EC2
  4. Perform a swap of the Elastic IP addresses to make the new version live
  5. Shut down the old EC2 instance

I'm concerned that switching the Elastic IP addresses could take time to begin to direct users to the new instance.

Also, is performing a Elastic IP swap this quite a 'standard' way of releasing new versions of websites within AWS?


Well, what's your definition of "instant"?

It happens quite fast IME, but no, it's not "instant" as in it's complete within 5 milliseconds of you issuing the command.

What's your root use case here? Why not just test it out for yourself?

  • Thanks for asking. I will clarify more in the question, 1 second – Luke Jan 12 '16 at 22:39
  • I have added some background information to the question. Apologies, I'm really quite new to AWS. – Luke Jan 12 '16 at 22:45

In my experience, the new assignement needs some seconds (15-30) before becoming operative.

  • Out of interest, is this the way that you release new versions of a website? Is it even suitable? I feel like I'm making things up and I don't really want to be... – Luke Jan 12 '16 at 22:52
  • if you release new versions by spinning up new instances they should be behind an ELB. Then you just remove the old instance from the ELB and add the new. – Mike Jan 12 '16 at 23:00
  • Is that the only way, to have the ELB? – Luke Jan 12 '16 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.