8

Amazon has recently added the ability to use any server as an origin server for Cloudfront, removing the original S3 only restriction.

My question is- how do I set this up? The AWS web-gui seems to only support the S3 buckets (still), and the ec2 command line tools don't appear to have anything for registering a Cloudfront distro.

Any thoughts much appreciated!

Thanks, Chris.

chrism2671
  • 2,549
  • 9
  • 34
  • 45

3 Answers3

8

You have to use the API to create a DistributionConfig that uses CustomOrigin (rather than S3Origin). Some documentation on how to do so here: http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/index.html?DistributionConfigDatatype.html#CustomOriginChildElements

Then you have to create a Distribution using that DistributionConfig: http://docs.amazonwebservices.com/AmazonCloudFront/latest/APIReference/index.html?CreateDistribution.html

More information on Distributions can be found here: http://docs.amazonwebservices.com/AmazonCloudFront/latest/DeveloperGuide/index.html?WorkingWithDistributions.html

I believe once you've created the Distribution, you can manage it from within the AWS Console, but you can't yet create them there.

Don MacAskill
  • 1,808
  • 3
  • 16
  • 22
  • 2
    Including this, which is pretty straightforward to use until the GUI tools catch up http://eternusuk.blogspot.com/2011/01/creating-custom-origin-server-for.html – jabley Jan 07 '11 at 11:36
7

Now-a-days you can setup Custom Origin via the AWS Web console.

Joel K
  • 5,765
  • 2
  • 29
  • 34
0

Add a loadbalancer your EC2, you can than select the load balancer as origin in Cloudfront.

http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CustomOriginBestPractices.html