Setting up CloudFront--S3 origin
It is one of the best practices to store your static files (such as text, images, and videos) into S3 and using CloudFront you can distribute the content from S3. In this recipe, we will focus on how to create a CloudFront web distribution for S3 origin.
How to do it...
- Create an S3 bucket:
- Log in to the
AWS Console
, selectAmazon S3
, and chooseCreate bucket
.
- Log in to the

S3: Create Bucket
- In the
Create Bucket
dialog, enter the name of the bucket, then inRegion
, select a Region for your bucket, and click onCreate
.
- In the

S3 Bucket Details
- Note that for your bucket to work with CloudFront, the name must conform to the DNS naming requirements. For more information, go to
Bucket Restrictions and Limitations
in the Amazon S3 Developer Guide or visit: http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html - By default, Amazon S3 creates buckets in the US-Standard region. We recommend that you choose a region close to you to optimize latency, minimize costs, and address...
- Note that for your bucket to work with CloudFront, the name must conform to the DNS naming requirements. For more information, go to