The following task list summarizes the process for creating a web distribution.
To Create a Web Distribution
Create one or more Amazon S3 buckets or configure HTTP servers as your origin servers. An origin is the location where you store the original version of your web content. When CloudFront gets a request for your files, it goes to the origin to get the files that it distributes at edge locations. You can use any combination of up to 10 Amazon S3 buckets and HTTP servers as your origin servers.
If you're using Amazon S3, note that the name of your bucket must be all lowercase and cannot contain spaces.
If you're using an Amazon EC2 server or another custom origin, review Requirements and Recommendations for Using Amazon EC2 and Other Custom Origins.
Upload your content to your origin servers. If you don't want to restrict access to your content using CloudFront signed URLs, make the objects publicly readable.
You are responsible for ensuring the security of your origin server. You must ensure that CloudFront has permission to access the server and that the security settings are appropriate to safeguard your content.
Create your CloudFront web distribution:
For more information about creating a web distribution using the CloudFront console, see Creating a Web Distribution Using the CloudFront Console.
For information about creating a web distribution using the CloudFront API, go to POST Distribution in the Amazon CloudFront API Reference.
Optional: If you created your distribution using the CloudFront console, create more cache behaviors or origins for your distribution. For more information, see To List, View, and Update CloudFront Distributions Using the CloudFront Console.
Test your web distribution. For more information, see Testing Your Web Distribution.
Develop your website or application to access your content using the domain name that CloudFront returned
after you created your distribution in Step 3. For example, if CloudFront returns d111111abcdef8.cloudfront.net as the
domain name for your distribution, the URL for the file
image.jpg in an Amazon S3 bucket or in
the root directory on an HTTP server will be
If you specified one or more alternate domain names (CNAMEs) when you created your distribution,
you can use your own domain name. In that case, the URL for
image.jpg might be
Note the following:
If you want to use signed URLs to restrict access to your content, see Serving Private Content through CloudFront.
If you want to serve compressed content, see Serving Compressed Files.
For information about CloudFront request and response behavior for Amazon S3 and custom origins, see Request and Response Behavior.