Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CacheControl header and other additional header turned into User-defined x-amz-meta-* metadata? #46

Open
joyfulelement opened this issue Feb 6, 2020 · 1 comment
Labels

Comments

@joyfulelement
Copy link

joyfulelement commented Feb 6, 2020

Hi, the use case is to set the System metadata for objects uploaded on S3 buckets. However, the result turned into User-defined metadata with prefix x-amz-meta- which is not expected.

e.g.

- bucketName: ${self:custom.bucketName}
      defaultContentType: "text/javascript"
      params: # optional
        - "*.js":
            CacheControl: "public, max-age=31536000"
            ContentType: "text/javascript"

Turned into:

Screen Shot 2020-02-06 at 11 47 13 AM

While the existing system metadata Content-type value remains intact. i.e. not synced
Also, the defaultContentType does not work either, instead of setting it to text/javascript, it always fall back to application/octet-stream

Question

Is there a support to set or override System metadata for objects uploaded on S3 buckets?
Many thanks!

@joyfulelement joyfulelement changed the title CacheControl header and other additional header turned into User-defined metadata? CacheControl header and other additional header turned into User-defined x-amz-meta-* metadata? Feb 6, 2020
@k1LoW k1LoW added the question label Feb 7, 2020
@nibynool
Copy link
Contributor

This should be setting the System metadata correctly. What version of the plugin are you using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants