Uploading ZIP file to S3, use EC2 to Unzip Uploading ZIP file to S3, use EC2 to Unzip codeigniter codeigniter

Uploading ZIP file to S3, use EC2 to Unzip


If you have an EC2 machine in the same region I would suggest you upload it there zipped and then it drop it to s3 from there unzipped. S3 cannot unzip it on its own as its all static.

Theres no charges between ec2 and s3 so ec2 can handle the unzipping and then write it out into your s3 bucket without additional transfer charges.


You can write code in a lambda to unzip a file of S3 bucket, you just have to use it, AWS Lambda will do this for you.

Referece:

  1. https://github.com/carloscarcamo/aws-lambda-unzip-py/blob/master/unzip.py
  2. https://github.com/mehmetboraezer/aws-lambda-unzip


S3 is just storage. Whatever file you upload is the file that is stored. You cannot upload a zip file then extract it once its in S3. If you wrote the application the best thing I could say is to try to re-design how you store the files. S3 requests are pretty cheap... you must be making a lot of requests.