Professional Freelance Web Developer
CodeIgniter Activist, Caffeine Junkie

Elliot Haughin

Amazon S3 CodeIgniter Library

Amazon S3 is a great storage solution for up and coming web apps.
It’s an affordable, scalable storage solution… and the prices really are fantastic!

United States

Storage
$0.15 per GB-Month of storage used
Data Transfer
$0.10 per GB – all data transfer in

$0.18 per GB – first 10 TB / month data transfer out
$0.16 per GB – next 40 TB / month data transfer out
$0.13 per GB – data transfer out / month over 50 TB

Requests
$0.01 per 1,000 PUT or LIST requests
$0.01 per 10,000 GET and all other requests*
* No charge for delete requests

Europe

Storage
$0.18 per GB-Month of storage used

Data Transfer
$0.10 per GB – all data transfer in

$0.18 per GB – first 10 TB / month data transfer out
$0.16 per GB – next 40 TB / month data transfer out
$0.13 per GB – data transfer out / month over 50 TB

Requests
$0.012 per 1,000 PUT or LIST requests
$0.012 per 10,000 GET and all other requests*
* No charge for delete requests

Data transfer “in” and “out” refers to transfer into and out of Amazon S3. Data transferred between Amazon EC2 and Amazon S3, is free of charge (i.e., $0.00 per GB), except data transferred between Amazon EC2 and Amazon S3-Europe, which will be charged at regular rates.

If you’re working with CodeIgniter, using Amazon S3 just got even easier!

To set up the library, open it up in your text editor and enter your key and secret key at the top of the library.

// -----------------------------------------
// -----------------------------------------
// your API key ID
var $keyId = "";
// your API Secret Key
var $secretKey = "";
// -----------------------------------------
// -----------------------------------------

Here’s an example of how to use the library in your controller:

$contents = file_get_contents($path);
$this->load->library('s3');
$this->s3->putObject($filename $contents, $bucketName, 'private', $file['type']);


Download Amazon S3 CodeIgniter Library

Current version: 1.0

Boring Stuff

Design © copyright Elliot Haughin 2009

Content published here are copyright their respective owners.

You cannot copy content from this site, either in English or translated to another language.

Keep Subscribed

Theres lots of ways for you to keep up with me on the web.

Please Note

Information given out on this blog should only be used as a guideline. I hold no liability for any code I write.

Always consult a professional before acting on this guidance.