igured in Terraform</a>.</p>
<p>Next.js may try to resolve these files as dynamic paths, which may result in the files not being found. To fix this, go into <code class="inline">infra/aws/root.tf</code> and add additional <code class="inline">ordered_cache_behaviours</code> as required.</p>
<p>For instance, if you want to serve a file <code class="inline">/myfile.png</code> provided in <code class="inline">public/myfile.png</code> and this file should be cached in CloudFront, add the following behaviour:</p