How do you put up a maintenance page for AWS when your instances are behind an ELB?

后端 未结 6 1403
滥情空心
滥情空心 2021-01-30 16:32

How do you put up a maintenance page in AWS when you want to deploy new versions of your application behind an ELB? We want to have the ELB route traffic to the maintenance inst

6条回答
  •  攒了一身酷
    2021-01-30 17:04

    Our deployment process first runs a cloudformation to spun up a ec2 micro instance (Maintenance instance) which copies pre-defined static page from s3 onto the ec2. Cloudformation is supplied with elb's to which micro ec2 instance is attached. Then a script (powershell or cli) is run to remove web instances (ec2) from elb's leaving Maintenance instance.

    This way we switch to maintenance instance during deployment process.

    In our case, we have two elb's, one for external and the other internal. Our internal elb's will not be updated during this process and is how we have post prod deployment smoke test is done. Once testing is done, we run another script to attach web instances back to elb's and delete the Maintenance stack.

提交回复
热议问题