Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cache Control S3 Objects

Saurabh Sudhir edited this page Sep 14, 2013 · 2 revisions

Adding Headers to Your Objects Using the Amazon S3 Console

Note Using the Amazon S3 console, you can only add headers to one object at a time, but with some third-party tools, you can add headers to multiple Amazon S3 objects at a time. For more information about third-party tools that support Amazon S3, perform a web search on AWS S3 third party tools. To add a Cache-Control or Expires header field to Amazon S3 objects using the Amazon S3 console

  1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.

  2. In the Amazon S3 console, in the Buckets pane, click the name of the bucket that contains the files.

  3. In the Objects and Folders pane, select the first object to which you want to add a header field.

  4. At the top of the Objects and Folders pane, click Actions and click Properties.

  5. In the Properties pane, click the Metadata tab.

  6. On the Metadata tab, click Add More Metadata.

  7. In the Key list, click Cache-Control or Expires, as applicable.

  8. In the Value field, enter the applicable value:

    For a Cache-Control field, enter:

    max-age=number of seconds that you want objects to stay in a CloudFront edge cache

    For an Expires field, enter a date and time in HTML format.

  9. Click Save.

  10. If you want to add a header field to additional objects, in the Objects and Folders pane, click the name of the next object, and repeat Steps 6 through 9.

Clone this wiki locally