-
Notifications
You must be signed in to change notification settings - Fork 0
Cache Control S3 Objects
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
-
Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.
-
In the Amazon S3 console, in the Buckets pane, click the name of the bucket that contains the files.
-
In the Objects and Folders pane, select the first object to which you want to add a header field.
-
At the top of the Objects and Folders pane, click Actions and click Properties.
-
In the Properties pane, click the Metadata tab.
-
On the Metadata tab, click Add More Metadata.
-
In the Key list, click Cache-Control or Expires, as applicable.
-
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.
-
Click Save.
-
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.