I am running a single instance Elastic Beanstalk environment with an EC2 instance and MySql RDS.

The documentation for applying a website update without down time is geared to multi instance environments. The premise is that you create a new environment in Elastic Beanstalk and then switch the CNAMEs which mitigates the down time.

What are the steps for ensuring no down time for a single instance environment?

For multi instance environments, Route53 for the domain us set up with a record pointing to the IP address of the load balancer. In my case, I have followed the instructions and pointed it to the Elastic IP of the EC2 instance.

When I create a new Elastic Beanstalk environment to configure the new version of my website, it will have a new Elastic IP, so the configuration of Route53 will need updating.

I can't just change the Elastic IP specified within Route53 to the new EC2's Elastic IP in order to switch, because people will still be being directed to the old EC2 Elastic IP because of the TTL (time to live) on the DNS record.

How can I set it up so that I can direct visitors to my domain to the new EC2 instance straight away without the use of a load balancer IP?

  • Why can you not use an ELB? They're relatively cheap, and they'll allow you to solve this problem the right way. – EEAA Jan 9 '16 at 17:19
  • The reason why I don't have one is because I don't have a requirement for load balancing as it's a single instance. Is adding an ELB the only way that I can configure my domain to a persistent elastic IP address? – Luke Jan 9 '16 at 17:28
  • If you're using EB, yes. If you were using self-managed EC2 instanced, then you could migrate the EIP to the new instance. Honestly, if you want to use EB, then you really have to go all-in, using EB and ELB. If you want to do things on your own, don't try and shoehorn it into EB. – EEAA Jan 9 '16 at 17:30
  • That sounds like a fair point to me, I hadn't considered just having standalone instances. Please excuse my lack of experience with this, but I'm a bit confused that EB gives you a choice of multi and single instance environments if it has to be shoe horned in like that. Surely it's a basic requirement to update a web app with a new version without down time, even for a single instance EB. Thanks for your time and advice. – Luke Jan 9 '16 at 17:36

Your Answer

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

Browse other questions tagged or ask your own question.