Is AWS A / B testing for static websites impossible with Cloudfront?

I have provided the following AWS resources for hosting a static website (via Cloudformation):

  • S3 bucket for website storage
  • Cloudfront distribution for CDN (to reduce latency)
  • Route 53 A record set that directs traffic to a CDN

I have two completely different websites that I would like to check in A / B to see the behavior and traffic conversions. Can I customize A / B testing using the resources I configured?

This is what I have tried so far.

Purchasing the same Cloudformation package for a second website does not work, because Cloudfront allows only one distribution to have a specific CNAME. For example, if my site example.com, only one Cloudfront distribution can configure this CNAME.

If I try to use an existing Cloudfront distribution, there seems to be no way to split traffic into two different websites hosted in different S3 buckets. In the Cloudfront distribution, I need to create a second lineage and then a behavior. Behavior requires a path + priority, so all traffic will be sent to one of the sites, but not the other.

Can't set up A / B testing of static websites hosted in S3 using Cloudfront?

+4

Source: https://habr.com/ru/post/1682227/


All Articles