in Uncategorized

s3cmd – how to put files with expiration on S3/CloudFront #AWS #s3

[bash]s3cmd put –add-header "Cache-Control: 604800" -P ./* s3://mybucket.com/path/to/files/[/bash]

If you have your CloudFront Distribution pointed to your S3 bucket, files will expire after the number of seconds specified in Cache-Control have passed.

You will need the wonderful s3cmd tool

Write a Comment

Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.