Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unzip ZIP file on Amazon S3

I'm uploading ZIP file to Amazon S3. Now I need to unzip that file on S3. Is there any commands that S3 has to unzip it there. I'm using JAVA to upload files to S3.

like image 811
Maksim Avatar asked Nov 28 '11 23:11

Maksim


2 Answers

Infact, I am doing the same thing. You upload the zip onto S3. Write a small java batch program that will scan your folder for the zip on S3, download it, unzip it and then upload the data back to S3 again. If you do this on a EC2 instance on the same region as your bucket, then since the latency is very low, that should happen very fast.

like image 93
sethu Avatar answered Sep 27 '22 17:09

sethu


S3 does not parse the contents of your files. It does not know how to unzip them. If you need to upload each file in the zip you should unzip it yourself and upload each one separately. This website about java.util.zip should get you started.

like image 29
Spike Gronim Avatar answered Sep 27 '22 17:09

Spike Gronim