1. 程式人生 > >Configure Your Website to Fail Over to S3 When a Health Check Fails

Configure Your Website to Fail Over to S3 When a Health Check Fails

This article assumes you already have an active Amazon Route 53 hosted zone, that the dynamic version of your website is hosted on an EC2 instance, and that the Route 53 hosted zone is already successfully routing website traffic to your EC2 instance.

To configure the hosted zone to fail over to a static website hosted in an Amazon S3 bucket when a Route 53 health check returns unhealthy, start by creating a static website following the instructions at

Configure a Bucket for Website Hosting. This static website will be what users see when your hosted zone fails over. Once your health check returns healthy again, the hosted zone will automatically start routing traffic to your primary endpoint.

Note: When naming the bucket, be sure that the S3 bucket name is the same as the name of your record.

Next, create the Route 53 health check:

  1. Sign in to the Amazon Route 53 console, and then from the navigation bar on the left, choose Health checks.
  2. Choose Create health check, and input the following:
    For Name, type a meaningful name for the health check.
    For What to monitor
    , choose Endpoint.
    For Specify endpoint by, choose IP address.
    For Protocol, choose HTTP.
    For IP address and Host name, type the IP and host name for your EC2 instance.
    For Port, choose 80.
    Leave Path empty, or specify the page you want to check.
  3. Choose Next.
  4. Choose Create health check.

Note: These instructions omit advanced configuration steps that you can use to customize aspects of your health check. For more details, see Advanced Configuration.

Next, create a record set for your primary endpoint:

  1. Select Domain Name of the hosted zone in which you want to create the record.
  2. Choose Create Record Set, and create a record set with the following (for all other fields, use values that fit your use case):
    For Name, type the value, making sure it is the same as the S3 bucket name.
    For Type, use A – IPV4 address.
    For Alias, leave it as No.
    For Routing Policy, choose Failover.
    For Failover Record Type, leave it as Primary.
    For Associate with Health Check, choose Yes, and choose the health check you created previously.
  3. Choose Create.

Last, create the failover endpoint:

  1. In the Hosted zones pane, select the hosted zone in which you want to create the record.
  2. Choose Go to Record Sets.
  3. Choose Create Record Set, and input the following:
    For Name, use the same value you entered for the primary record.
    For Type, choose A – IPV4 address.
    For Alias, choose Yes.
    Note: Aliases automatically use a time to live (TTL) that matches the alias target.
    For Alias Target, choose the S3 bucket you created previously.
    For Routing Policy, choose Failover.
    For Failover Record Type, choose Secondary.
    For Set ID, type a name.
    Note: The name for the Set ID on your failover endpoint must be different from the name of the Set ID on your primary endpoint.
    For Associate with Health Check, choose No.
  4. Choose Create.

相關推薦

Configure Your Website to Fail Over to S3 When a Health Check Fails

This article assumes you already have an active Amazon Route 53 hosted zone, that the dynamic version of your website is hosted on an EC2 insta

Routing in React Native apps and how to configure your project with React

Tab Navigator implements a type of navigation that exists in native iOS for many years already. Recently, Android added it to its Material design patterns

Ask HN: What strategies do you use to encourage users to promote your website?

What strategies do you use to encourage your users to promote your website? Here's a bit more about my specific situation;I created a saas product used by

This is what it’s like to fail your interviews at Google.

The entire interview process was to take about a month, and if all went well, would encompass a series of five interviews for the role. Google’s courtship

下載Docker Compose超時的問題(Fail connect to github-production-release-asset-2e65be.s3.amazonaws.com:443)

今天一個同事問我,他在linux上按Docker Compose官網下載報了一個錯,網上找不到好的解決方法,Fail connect to github-production-release-asset-2e65be.s3.amazonaws.com:443然後我想是不是解析

Your Chinese Visa Is about to Expire, Check It!

then use self obi see trouble rri ini med Mr. Felix met his Chinese wife during his business trip to China. When he was trying to change

what causes component requestFocus to fail sometimes?

focus blog clas etime http log class component div https://stackoverflow.com/questions/13810777/what-causes-component-requestfocus-to-fai

python安裝失敗提示“one or more issues caused the setup to fail . Please fix the issues and then retry setup.For more information see the log file”

ase ice body orm bubuko mat 解決方法 3.4 mage 換了項目組,換了新電腦,重裝Python時遇到提示如下圖所示: 原因:需要安裝Windows 7 Service Pack 1 直接點擊“update your

解決錯誤:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.

context 錯誤 com sta spa can src 直接 代碼 原因是代碼直接放在默認包裏邊,比如src\main\java目錄下 應該在src\main\java下建立子目錄,比如src\main\java\com\test 這樣的話,代碼就在com.tes

Python安裝問題之One or more issues caused the setup to fail.Windows7安裝Python3.7

分享圖片 安裝 win 推薦 visual 直接 sof issue 窗口 首先大部分人出現這個問題的主要原因在於安裝版本是大於python3.4的,早期的版本對win7都是比較兼容的 所以如果需要安裝較新的版本,就會出現這個問題,就需要安裝Windows 7 Servic

javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in <forEach>

十一月 20, 2018 11:02:42 下午 org.apache.catalina.core.ApplicationDispatcher invoke 嚴重: Servlet.service() for servlet jsp threw exception javax.servlet.jsp

Jenkins deploy war to tomcat over https

tomcat - Jenkins does not redirect to HTTPS - Stack Overflowhttps://stackoverflow.com/questions/23703523/jenkins-does-not-redirect-to-https Jenkins deploy

Springboot 中報錯 Your ApplicationContext is unlikely to start due to a @ComponentScan

用springboot 寫scala程式碼是最近做的一個專案,但是我啟動的時候拋了一個錯誤,具體就是Your ApplicationContext is unlikely to start due to a @ComponentScan of the default pack

MobiLimb adds a FINGER to your phone that strokes your wrist and mimes emoji to you

The future of smartphones might not be flashy technology like augmented reality, but a device that actually takes a page from the real world - at least, if

Robots set to create over 100 million jobs by 2022

Robots aren't the job-pilfering monsters that Hollywood's sci-fi community would have you believe, with the World Economic Forum (WEF) predicting in its 20

Attempt to sue Google over data collected from iPhones on users fails at High Court

An attempt to sue Google over claims it collected sensitive personal data from millions of iPhone users has failed at the High Court. The claim would have

How to Decide What to Do With Your Life

Stop Doing This to YourselfWhat’s your purpose in life?What’s your passion?These questions send cortisol grenades throughout your body when you think about

How to Use Checklists to Improve Your UX

How to Use Checklists to Improve Your UXAccording to data published by researchers at the Harvard T.H. Chan School of Public Health, more than 234 million

DARPA to Grant $2B to AI Projects Over Next Five Years

DARPA stands for “Defense Advanced Research Projects Agency,” but while defense is good and all, what DARPA is really into is that

Ask HN: How to Convert over 100 VHS tapes to digital

Easy: pay someone. Your local photography store (any big city will have one, but good luck finding it) can do it.Cheap: your local big city library probabl