Reputation: 43
I would like to keep all of my files on Amazon S3, and just zip directories as I need to, instead of needing to download all the files from S3, zip it, and then upload the zip to S3.
Currently I download my files and zip it to upload. I haven't found anything when searching for this issue.
Upvotes: 1
Views: 6750
Reputation: 1638
If you are okay to use Amazon S3 Glacier to store your objects then you can use Amazon S3 lifecycle to archive your data after "x" days and copy it to Glacier. This will also help you to save cost.
See: How Do I Create a Lifecycle Policy for an S3 Bucket? - Amazon Simple Storage Service
Upvotes: 1
Reputation: 269302
Amazon S3 is an object storage service. It does not have the ability to zip files.
You would need to download, zip, upload the files. This could be done on an Amazon EC2 instance or via AWS Lambda.
AWS Lambda provides serverless compute, which means you simply need to provide the code and an activation trigger, and the code will run. It's actually just a short-lived container that runs the code.
However, AWS Lambda functions only have 500MB of storage space, so you would need to ensure that this is sufficient to store the original files and the zip file. Make sure the Lambda function deletes these files after execution because the Lambda environment can be reused for future executions.
AWS Lambda can use many different programming languages (eg Python, Node, .Net). It is always available on AWS, if you have been granted permission to use it.
See:
Upvotes: 3