How to forward non WWW to WWW with AWS Amazon Cloud front behind HTTPS cloud front
<p>I already have Cloud Front setup to redirect all calls to HTTPS protocol. 
Now I want to forward "non www" to www. How can I achieve this with respect to the current setup?</p>

<p>I tried the one below, but it wasn't successful as this one doesn't take HTTPS redirection into consideration.</p>

<p><a href="https://www.pbxdom.com/how-redirect-non-www-to-www-with-amazon-cloud-front-route-53-and-s3" rel="noreferrer">https://www.pbxdom.com/how-redirect-non-www-to-www-with-amazon-cloud-front-route-53-and-s3</a></p>

<p>URL doesn't redirect www. Instead, it shows error message:
This XML file does not appear to have any style information associated with it. The document tree is shown below.</p>

<pre><code>&lt;Error&gt;
&lt;Code&gt;AccessDenied&lt;/Code&gt;
&lt;Message&gt;Access Denied&lt;/Message&gt;
</code></pre>