Is there a mechanism for automatically compressing objects loaded to S3?

0

I have a customer who has asked for the following functionality:

When a new object is loaded into S3, there is a "compression" option in the API which automatically compresses this file before loading it into S3.

This would save customer money in storage costs.

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

This does not exist as a built-in feature of S3. However, you can have Lambda compress objects as they are added to the bucket. Here is an example: lambda-s3-zip.

You can also compress on the command line as you are copying the object into S3.

gzip myfile.txt | aws s3 cp - s3://mybucket/myfile.txt.gz
profile pictureAWS
專家
kentrad
已回答 2 年前

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

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

回答問題指南