Is Amazon s3 required if am using Cloudfront for files

I am planning to host a website in Amazon Ec2 instant. I got some basics from the docs. But I have few confusions.

If am using cloudfront for CDN, do i really need to server files from s3? The site am hosting is build on Drupal. Does it have any performance difference?


Solution 1:

You don't have to use S3 as the origin for a CloudFront distribution, you can specify an arbitrary HTTP server. There are some limitations however; from the CloudFront documentation:

A custom origin is an HTTP server, for example, a web server. The HTTP server can be an Amazon EC2 instance or an HTTP server that you manage privately. When you use a custom origin, you specify the DNS name of the server, along with the HTTP and HTTPS ports and the protocol that you want CloudFront to use when fetching objects from your origin.

Most CloudFront features are supported when you use a custom origin with the following exceptions:

  • Streaming distributions—Not supported.

  • Private content—Although you can use a signed URL to distribute content from a custom origin, for CloudFront to access the custom origin, the origin must remain publicly accessible. For more information, see Serving Private Content through CloudFront.