Skip to content

Instantly share code, notes, and snippets.

@tfentonz
Last active July 23, 2020 01:59
Show Gist options
  • Save tfentonz/80a143ad8dbec67eb6476ecb31fd0814 to your computer and use it in GitHub Desktop.
Save tfentonz/80a143ad8dbec67eb6476ecb31fd0814 to your computer and use it in GitHub Desktop.
Update S3 object metadata Content-Type and Cache-Control
aws s3 cp s3://BUCKET_NAME/PREFIX/ s3://BUCKET_NAME/PREFIX/ \
--metadata-directive 'REPLACE' \
--content-type 'image/png' \
--cache-control 'public, max-age=2592000, immutable' \
--recursive \
--exclude '*' \
--include '*.png'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment