1

I have an e-commerce website, an ASP.NET website running on Windows/IIS. Currently I have all my product photos on the local server's File System but since the number of photos are growing I have decided to move the photos to S3 bucket on AWS.

To improve performance, I would like to use AWS CloudFront to server the images from this S3 bucket.

Now I have realized that I can also serve the website itself from CloudFront and I believe this would improve the website load time.

Question

Does it make sense to create 2 AWS CloudFronts? one for serving the website (origin would be the Load Balancer) and one for delivering Images (Origin would be S3 bucket)?

2

CloudFront can accelerate static and dynamic content. Content goes over the AWS backbone which is optimized for this task. Make sure your caching headers are set up correctly.

You should use a single CloudFront distribution to serve sources from both origins. This article gives you some guidance. A search for "CloudFront multiple origins" will give you dozens of other resource.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.