<p>I am currently trying to implement an error page which doesn't touch/bloat the backend.</p>
<p>In theory, on a 503 it should proxy the request from the host to <a href="https://mybucketname.s3.amazonaws.com/folder/file.html" rel="nofollow noreferrer">https://mybucketname.s3.amazonaws.com/folder/file.html</a>.</p>
<p>The closest I have gotten was a redirect to the s3 page, however, in this case it must be proxied.</p>
<p>my server snippet at the moment consists of the following:</p>
<pre><code>  server-snippet: |
    error_page 404 &quot;https://mywebsite.com/notfound&quot;;
    proxy_intercept_errors on;
</code></pre>

<p>You need to add some metadata to you Ingress manifest</p>
<pre><code>metadata:
  annotations:
    nginx.ingress.kubernetes.io/upstream-vhost: &lt;s3bucketname&gt;
    nginx.ingress.kubernetes.io/from-to-www-redirect: &quot;true&quot;
    nginx.ingress.kubernetes.io/use-regex: &quot;true&quot;
</code></pre>
<p>Also, you need to create a service that will be used by Ingress</p>
<p>Like something that:</p>
<pre><code>kind: Service
apiVersion: v1
metadata:
  name: front-end-service
spec:
  type: ExternalName
  externalName: &lt;s3bucket or cloudfront link&gt;
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: 80
</code></pre>
