I have https public facing website hosted on linodes web hosting company. I created Cloudfront distribution for this website in my AWS account but it shows no activity as if nothing happening. Is there something I need to do to my website? If so what exactly I need to do?
Assume cloudfront url for my distrbution is abcxyz.cloudfront.net and my website is mysite.com which is https website.
Added:
By no activity I mean when I go to mysite.com, no data or logs generated in my cloudfront distribution which means content is coming from mysite.com and not from cloudfront cache. When I go to abcxyz.cloudfront.net, it shows content of mysite.com.
mysite.com is dynamic java website, html content is generated dynamically and user can interact with search feature on mysite.com. It is real estate website showing a lot of images of properties. All images urls are dynamically generated and looks like https: // www.mysite.com/photos/properties/5eef42ca5366c1485ad8693c/thumb/2500-feet-4.4-residential-for-sale-DSC_0001.JPG
I tried to add CNAME record (abcxyz.cloudfront.net) in CNAME DNS setting after login to Linode.com (my web hosting company) but it did not make any difference.
Its more than 2 weeks and still this cloudfront distribution has all metrics empty while mysite.com gets 2 or 3 visitors a day from around the world.
I decided to delete my original answer and give you a step by step of what to do based on what I just did. I created two identical web pages, called fast.html and slow.html; the only thing they do is load 9 very big images, which I got from here https://effigis.com/en/solutions/satellite-images/satellite-image-samples/, totaling 335 Megabytes. The slow.html web page will load the images from the images directory on my machine. The fast.html web page will load the images from the CloudFrond distribution, which in turn gets the images from an S3 bucket to which I upload the images. So, step by step, here it is.
Create an S3 bucket called cf-big-images and inside the bucket create a folder called images
Upload the images to the bucket. I copied them from the images folder in the root of my Apache web server with the command aws s3 cp . s3://cf-big-images/images --recursive
Go into the images folder in the S3 bucket and make them public; this is set readonly for the public.
In CloudFront create a distribution. You only need to fill the field "Origin Domain Name". Click the field and you will see your S3 bucket there "cf-big-images.s3.amazonaws.com"; select it. [Note: I had this wrong on my original message]
That's it. Click on "Create Distribution" and wait. It takes quite a bit.
Change the fast.html web page. On my slow.html page I had:
<img src="images/Img15.jpg"> <img src="images/Img16.jpg"> <img src="images/Img17.jpg"> <img src="images/Img18.jpg"> <img src="images/Img34.jpg"> <img src="images/Img41.jpg"> <img src="images/Img48.jpg"> <img src="images/Img58.jpg"> <img src="images/Img100.tif">
On the fast.html web page I have:
<img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img15.jpg"> <img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img16.jpg"> <img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img17.jpg"> <img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img18.jpg"> <img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img34.jpg"> <img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img41.jpg"> <img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img48.jpg"> <img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img58.jpg"> <img src="https://d1pqzepyfmpq4.cloudfront.net/images/Img100.tif">
Hopefully it makes sense now.