Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

panbanda/kohana-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Amazon AWS for Kohana 3+

A module for managing amazon aws (including EC2, SQS, S3, and AWIS) Kohana framework (v3.0+).

Quick Start

This is a wrapper module to avoid entering your private key and and access key each time you call methods. It also contains a helper for linking to assets inside of your S3 buckets. It supports streaming URLs if your bucket is streaming. Please see the config file.

Modify the Config File

Move config/amazon.php to your application config directory and modify your Amazon security information as Amazon indicates.

Code Away!

Example of a class:

class Controller_Amazon extends Controller {
    
    public function action_s3()
    {
        $s3 = new Amazon_S3;
        $s3->upload('assets/icons/fast_forward.png', 'test.png', 'bucket_name');
		
        echo Amazon::asset('test.png', 'bucket_name');
    }
	
	public function action_sqs()
	{
		$sqs = new Amazon_SQS;
		
		$url = 'http://queue.amazonaws.com/inputqueue';
		
		echo Kohana::debug($sqs->listQueues());
		echo Kohana::debug($sqs->getSize($url));
		echo Kohana::debug($sqs->receiveMessage(1, NULL, $url));
	}
    
}

About

A wrapper module for php-aws inside of Kohana 3+

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages