<p>Running MinIO (<a href="https://docs.min.io/" rel="nofollow noreferrer">https://docs.min.io/</a>) on kubernetes 1.12. I am unable to run aws cli commands via nginx-ingress. Commands work fine when port-forwarding directly to the kubernetes service.</p>

<p>Tried </p>

<pre><code> proxy_set_header Host $http_host;
</code></pre>

<p>and</p>

<pre><code> more_set_input_headers 'Host: minio:9000';
</code></pre>

<p>nginx rules but with no luck.</p>

<p>Example request:</p>

<pre><code>aws s3 ls --endpoint-url https://my-endpoint-url.com --profile=minio
</code></pre>

<p><strong>Unable to list bucket content. Instead receive error:</strong></p>

<blockquote>
  <p>An error occurred (SignatureDoesNotMatch) when calling the ListBuckets
  operation: The request signature we calculated does not match the
  signature you provided. Check your key and signing method.</p>
</blockquote>

David H.
<p>This turned about to be an issue w/ a rewrite. (Broke presigned URLs.)</p>

<p>nginx.ingress.kubernetes.io/rewrite-target: /mybucket/$1</p>

<p>Removing the rewrite, and modifying the path in the request, fixed the issue.</p>
