title: CloudFront wasn't able to connect to the origin
body: <p>I had set up Cloudfront correctly over http. It fetched data from my website (dev.pie.video) fine. I'm now moving to https. Things are working fine at <code>https://dev.pie.video</code> but Cloudfront is unable to server any content.
  For instance <a href="https://dev.pie.video/favicon-96x96.png" rel="noreferrer">https://dev.pie.video/favicon-96x96.png</a> works but <a href="https://d1mbpc40mdbs3p.cloudfront.net/favicon-96x96.png" rel="noreferrer">https://d1mbpc40mdbs3p.cloudfront.net/favicon-96x96.png</a> fails with status 502, even though my Cloudfront distribution <code>d1mbpc40mdbs3p</code> points to <code>dev.pie.video</code>.</p>
  
  <p>More details if that's helpful:</p>
  
  <ul>
  <li><code>d1mbpc40mdbs3p.cloudfront.net</code> uses the default CloudFront Certificate for https</li>
  <li>the cloudfront distribution's origin is set to work over SSL and TLS, and to use the viewer's protocol.</li>
  </ul>
  
  <p>===== Edit 1 =====</p>
  
  <p>screenshots of the cloudfront settings:</p>
  
  <p>General:
  <a href="https://i.stack.imgur.com/f3YzY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/f3YzY.png" alt="enter image description here"></a></p>
  
  <p>Origin:</p>
  
  <p><a href="https://i.stack.imgur.com/eD3x9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/eD3x9.png" alt="enter image description here"></a></p>
  
  <p>Behaviors:</p>
  
  <p><a href="https://i.stack.imgur.com/YPqX5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YPqX5.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/Nbw88.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Nbw88.png" alt="enter image description here"></a></p>
  
  <p>==== Edit 2 ====</p>
  
  <p>if that's helpful, the logs I'm getting from cloudfront look like</p>
  
  <pre><code>&lt;timestamp&gt; SFO20   924 96.90.217.130   GET d1mbpc40mdbs3p.cloudfront.net   /favicon-96x96.png  502 -   &lt;someInfoOnTheClientBrowser&gt;    2   -   Error   poZyhl63JNGFk8dIIjCluGDm4dxF8EdMZFhjg82NgHGPNqcmx6ArHA==    d1mbpc40mdbs3p.cloudfront.net   https   494 0.002   -   TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 Error   HTTP/1.1
  </code></pre>