上传ZIP文件到S3,EC2使用解压缩 [英] Uploading ZIP file to S3, use EC2 to Unzip

查看:2711
本文介绍了上传ZIP文件到S3,EC2使用解压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个codeigniter web应用程序被上传每隔一小时到Amazon S3,这是造成我的S3请求费用直线上升真正的快很多小文件。要克服这一点的一种办法,是压缩了文件,上传zip文件到S3,然后将它解压缩时,它是在S3上。

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.

可以这样做使用EC2?还是有更好的方法来实现这一目标?谢谢!!

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

编辑:如果我是使用EC2,我用PHP来触发创建一个EC2实例,上传到解压压缩文件所需的PHP文件,复制uncom pressed文件到S3,然后销毁EC2实例?

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?

推荐答案

如果你有一个EC2机在同一地区,我建议你把它上传有压缩,然后将其拖放到S3从那里解压缩。 S3不能自行将它解压缩它与所有静态的。

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.

即使世界EC2之间没有收费和S3等等EC2可以处理解压,然后写出来到您的S3存储,无需额外传输费用。

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.

这篇关于上传ZIP文件到S3,EC2使用解压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆