title: How to check if CloudFront is failing over to another active distribution?
body: <p>I have a website <a href="http://www.s3post.cf/" rel="nofollow noreferrer">s3post.cf</a> that gets a <code>.json.gz</code> from an <a href="http://post.s3post.cf/s3posts.json.gz" rel="nofollow noreferrer">AWS CloudFront distribution</a> that has an <a href="https://s3.amazonaws.com/cloudfront.s3post.cf/s3posts.json.gz" rel="nofollow noreferrer">S3 bucket</a> as its origin.</p>
  
  <p>I've enabled cross-region replication for that bucket with <a href="https://s3-us-west-2.amazonaws.com/s3post.cf/s3posts.json.gz" rel="nofollow noreferrer">another bucket</a> and set up a second <a href="http://backup.s3post.cf/s3posts.json.gz" rel="nofollow noreferrer">CloudFront distribution</a>.</p>
  
  <p>On Route 53, I created a health check associated with a file in the first bucket <code>cloudfront.s3post.cf</code> and setup a CloudFront failover -</p>
  
  <ul>
  <li>The second distribution <code>backup.s3post.cf</code> has a simple routing policy to its CloudFront distribution's domain name.</li>
  <li>The first distribution <code>post.s3post.cf</code> has a primary failover policy associated with above mentioned healthcheck.</li>
  <li><code>post.s3post.cf</code> also has a secondary failover policy that uses <code>backup.s3post.cf</code>(the second distribution) as its alias.</li>
  </ul>
  
  <p>To test this setup, I removed public permissions from the health check file. The health check failed and my site is still alive. However, the <code>.json.gz</code> file in both buckets is public so I'm not sure if the failover succeeded.</p>
  
  <p>How can I test if <code>post.s3post.cf</code> actually failed over to <code>backup.s3post.cf</code>? I can't just delete the <code>.json.gz</code> file as it's deleted in the second bucket too due to cross-region replication.</p>