CLOUDFRONT EC2 origin error CloudFront attempted to establish a connection with the origin
I had invalid certificate chain thats is what causing all the trouble.
ayush lodhi
Updated on June 14, 2022Comments
-
ayush lodhi almost 2 years
I have a Cloudfront distribution with custom origin (EC2), When I am fetching the file like http://xyz.cloudfront.net/assets/abcd.jpg
I am getting error like
The request could not be satisfied. CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection. CloudFront wasn't able to connect to the origin. Generated by cloudfront (CloudFront) Request ID: cDjvMwhz6AhjwOyTgEqwH6KPA3X97Zq1GXQLtvdUlkAWIUDmUAincA==
but after 10-15 mins if i try to fetch rom same url then I works fine, then if I fetch new url same things happen. I don't understand what is the problem here why first time fetching the new file is generating error?
EDIT
The problem is with https, I have changed the cloudfront distribution to serve https only now the cloudfront always return "The request could not be satisfied."
My server is configured correctly i can able to access it with https
I don't want to use custom CNAME, the dns name provided by cloudfront is okay, I just want to serve assets on https only, Is there any custom ssl requirement on cloudfront for this?