Search code examples
amazon-web-servicesamazon-s3replicationamazon-cloudfront

CloudFront CDN for S3 bucket which is cross region replicated


Given yesterday's us-east-1 S3 outage, how do I best architect a CloudFront CDN which uses a S3 bucket as the source and the bucket is setup to replicate to another region?

  1. Do I setup two separate CloudFront CDNs, one with the bucket in us-east-1 as the origin and another CloudFront CDN with the replicated bucket in us-east-2 as the origin and then use one Route53 record to access the two CDNs?

or

  1. Can I setup one CloudFront CDN with two Origins (one in us-east-1 and the other in us-east-2) and CloudFront will automatically pull the content from the S3 region which is working?

Any other solution?

Your insights and comments are much appreciated.

Cheers Bernie


Solution

  • It turns out that neither of my proposals worked and that Cloudfront does not support S3 replication and failover out of the box.

    Below architecture should have survived the 2/28/17 North Virginia S3 outage (Thanks for the help @Michael-sqlbot).

    I am surprised though that AWS does not offer a more trivial solution for such a fairly common scenario... S3 Failover With Cloudfront