AMAZON SIMPLE STORAGE SERVICE

0

How can we add cache control in AWS S3?

已提問 2 年前檢視次數 303 次
1 個回答
2
已接受的答案

Do you mean for each individual object? You would have to use something like this to add it to existing objects:

aws s3 cp s3://<yourbucket>/ s3://<yourbucket>/ --recursive --metadata-directive REPLACE \
--expires 2022-01-01T00:00:00Z --acl <your-acl> --cache-control max-age=2592000,public

Replace the place holders as necessary / needed. And that should be fine.

When you put new object you need to ensure you set the metadata as well. See https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingMetadata.html for more information.

AWS
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南