I've provisioned the following AWS resources to host a static website (via Cloudformation):
I have two completely different websites that I'd like to A/B test to see traffic behavior and conversions. Is it possible to configure A/B testing using the resources that I've configured?
This is what I've tried so far.
Bringing up the same Cloudformation stack for the second website doesn't work cause Cloudfront only allows a single distribution to have a particular CNAME. For example if my website is example.com
, only one Cloudfront distribution can have that CNAME configured to it.
If I try to use the existing Cloudfront distribution there doesn't seem to be a way to split traffic to the two different websites hosted in different S3 buckets. Within the Cloudfront distribution I need to create a second origin and then a behavior. The behavior requires a path + precedence so all the traffic will get sent to one of the websites but not the other.
Is it not possible to configure A/B testing of static websites hosted in S3 with Cloudfront?
You can use a Lambda@Edge function to manipulate the request and then serve a different page using CloudFront.
A/B Testing example:
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-examples.html#lambda-examples-a-b-testing
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With