s3deploy icon indicating copy to clipboard operation
s3deploy copied to clipboard

Restore ability to set x-amz-website-redirect-location system-defined metadata

Open GrantASL19 opened this issue 11 months ago • 0 comments

In earlier releases of s3deploy (e.g. 2.3.5) it was possible to set the x-amz-website-redirect-location property of an object like so:

routes:
  - route: "^index\\.html$"
    headers:
      x-amz-website-redirect-location: /fa/

And end up with an object with this metadata:

Image

In 2.12.1 the some configuration produces:

Image

x-amz-website-redirect-location is a system-defined metadata that tells S3 to issue a redirect; x-amz-meta-x-amz-website-redirect-location is treated as user metadata.

Looking at the code a bit I think you might need to expand the special metadata cases here to cover the x-aws-* system-defined metadata.

I assume this changed when you updated the AWS SDK to v2 as you mention here.

(Currently busy and have an internal workaround for this, but I’m open to making a PR with a fix for this in the future!)

GrantASL19 avatar Feb 14 '25 20:02 GrantASL19