Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I have a Codeigniter web app that is uploading many tiny files every hour to Amazon S3, which is causing my S3 request charges to shoot up real fast. One way to overcome this will be to zip up the file, upload the zip file to S3, then unzip it when it is on S3.

Can this be done using EC2? Or is there a better method to achieve this? Thank you!!

EDIT: If I were to use EC2, do I use PHP to trigger the creation of a EC2 instance, upload the PHP file required to unzip the zipped files, copy the uncompressed files to S3, then destroy the EC2 instance?

closed

1 Answer

+1 vote
by (18.2k points)
selected by
 
Best answer

Since S3 won't be able to unzip the file, as it's all static, the best option for you here is to upload the zip file on an EC2 instance in the same region. The drop the unzipped version to s3.

this won't even charge you anything as there is no cost for moving files between s3 and ec2. So let EC2 take care of unzipping then you can write it on S3 bucket.

In order to get a better understanding of the concept, you can refer to AWS EC2.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
2 answers
0 votes
2 answers

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...