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 年前7114 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则