Skip to content

How to add custom metadata e.g "cache-control"? #264

@rioastamal

Description

@rioastamal

Official AWS CLI does support adding metadata such as --content-type and --cache-control.

$ aws s3 sync ./mydir/ s3://example-bucket/mydir/ \
--content-type 'application/rss+xml; charset=UTF-8' \
--cache-control 'max-age=86400'

The reason I need custom metadata is because I use S3 as static website hosting which sits behind Cloudfront. Setting correct origin headers such as cache-control and content-type for CDN/Proxy is important to my case.

How do I add custom metadata when uploading object using s5cmd? It seems I did not find the options.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions