I use an EFS on an EC2 instance with per-user writable subdirectories. Basically, user john
has his images served from /home/john/images
and user sally
has her images served from /home/sally/images
with virtual hosts set up for each user.
I was hoping to use CloudFront to reduce my Data Transfer costs, but I'm not sure how I'd configure CloudFront to serve the image content for all users using a single origin domain.
Is there a way to set up some kind of pattern matching in CloudFront to achieve something like this?
cdn.mywebsite.com/john
=> /home/john/images
cdn.mywebsite.com/sally
=> /home/sally/images