Replace ‘YOUR-BUCKET-NAME’ in the code with your real bucket name.
Sign in to the AWS Management Console and open the CloudFront console
Choose Create Distribution.
On the first page of the Create Distribution Wizard, in the Web section, choose Get Started.
Specify settings for the distribution as shown below. For more information, see Values that you specify when you create or update a distribution.
Origin domain - The DNS domain name of the Amazon S3 bucket
Name - unique name for the distribution
In the settings, select add item in Alternate domain name (CNAME) and enter your cutom domain url
In Custom SSL certificate, select the ssl cert created in the previous step, from the dropdown list.
Click on Create distribution
After CloudFront creates your distribution, the value of the Status column for your distribution will change from InProgress to Deployed.
When your distribution is deployed, confirm that you can access your content using your new CloudFront URL or CNAME.