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.

gefragt vor 2 Jahren7113 Aufrufe
1 Antwort
0
Akzeptierte Antwort

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
EXPERTE
kentrad
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen