AMAZON SIMPLE STORAGE SERVICE

0

How can we add cache control in AWS S3?

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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인