How to copy / dump file from S3 to EC2 in PHP

I have a file on S3 Example: test-company / upload / abc.txt I want to upload this abc.txt to my EC2 in php Anyone have an idea please share it with an example.

0


a source to share


4 answers


I used amazon-s3-php-class which works great.



Zend Framework also has AWS support  although you cannot use it in Europe until ZF 1.8.2 is released. (Due to a bug in 1.8.1 which has been fixed in svn now)

+3


a source


I used a linux utility called s3cmd . I think you can call this command line utility from PHP easily.



0


a source


I would opt for the new Zend Framework implementation (1.8). Haven't tested it yet, but you can find it at http://framework.zend.com/ . The docs here: http://framework.zend.com/manual/en/zend.service.amazon.s3.html

0


a source


There is no way to "load into EC2" as this is a virtual server instance and not a storage service. You will need to host your own service on EC2 in order to load it.

However, you can boot from S3 to EC2. Just run wget or a similar EC2 instance to pull the file from the S3 website url (upon authentication if needed).

0


a source







All Articles