0

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?

Luke
  • 549
  • 1
  • 6
  • 18

2 Answers2

2

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?

EEAA
  • 109,363
  • 18
  • 175
  • 245
1

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

shodanshok
  • 47,711
  • 7
  • 111
  • 180
  • 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