"No such key" error and image not fetched from Magento file system by Cloudfront if not found on S3
I am using Magento 1.9.3.4. I have came so across learning from here and configured cloudfront with my S3 bucket. (dint select S3 from drop down while creating distribution). I am using magento S3 extension for images from /media folder to S3 bucket.
I have also configured CNAME & custom SSL in cloudfront successfully. Also i have updated magento secure and unsecure URLs with success by following this article
What i want to achieve is:-
I want to serve my magento /media folder static content through S3 & cloudfront.
My Understanding is:
S3 magento extension uploads /media folder's content to my S3 bucket. Now cloudfront use this S3 bucket images and show images in my product pages.
Problem:- There are now 2 problems:
1) I have set below settings in ORIGIN details (so that if cloudfront don't find image in S3 bucket, it will get from my magento web server ), but still it is not working.
2) As a result of this may be, I am getting below error for some of product images
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
<ul>
<li>Code: NoSuchKey</li>
<li>Message: The specified key does not exist.</li>
<li>Key: media/catalog/product/cache/1/image/9df78eab33525d08d6e5fb8d27136e95/4/3/43795518xa63icyL.jpg</li>
<li>RequestId: D6FEF1331EC261CC</li>
<li>HostId: Rsyk57Bkwy86WpcqIBZXv22Qn6gOZjDbNPrqKbNKkC9yN7IF0QLEM2DJQqNSfXcrms2mqMCcMiw=</li>
</ul>
<hr/>
</body>
</html>
I have followed this SO article & this one and completely updated my cloudfront configuration as detailed by Michael - sqlbot in both answers. I have also set Error Caching Minimum TTL (seconds) to 0 for 404 Error in error pages.
Now the status of the distribution is DEPLOYED after making all changes. Still problem is not solved.
Am i missing some settings or TTL/Keep alive settings or any troubleshooting will be really helpful.