cuppett/cakephp-aws_utils

This package is abandoned and no longer maintained. No replacement package was suggested.

CakePHP Amazon Web Services Utilities

1.0.1 2015-01-25 16:16 UTC

This package is auto-updated.

Last update: 2020-08-19 00:37:29 UTC


README

AWSUtils provides a small set of wrappers and harnesses to integrate AWS services directly into your CakePHP applications

Requirements

The master branch has the following requirements:

  • CakePHP 2.2.0 or greater.
  • PHP 5.3.0 or greater.

Features

Installation

  • Clone/Copy the files in this directory into app/Plugin/AwsUtils
  • Ensure the plugin is loaded in app/Config/bootstrap.php by calling CakePlugin::load('AwsUtils');

Using Composer

Ensure require is present in composer.json. This will install the plugin into Plugin/AwsUtils:

{
    "require": {
        "cuppett/cakephp-aws_utils": "1.0.*"
    },
    "extra":
	{
	    "installer-paths":
	    {
	        "app/Plugin/AwsUtils": ["cuppett/cakephp-aws_utils"]
	    }
	}       
}

Quick Example

Integrating the session handler into core.php

use Aws\Common\Enum\Region;

$aws = array(
    'includes' => array(
        '_aws'
    ),
    'services' => array(
        'default_settings' => array(
            'params' => array(
                'region' => Region::US_EAST_1
            )
        )
    )
);

Configure::write('Session', array(
    'defaults' => 'database',
    'timeout' => 60,
    'handler' => array(
        'engine' => 'AwsUtils.DynamoDBSession',
        'aws' => $aws
    ),
    /* Avoid gc from web-app, manually sweep/clean later */
    'ini' => array('session.gc_probability' => 0)
));

Reporting issues

If you have a problem with AwsUtils please open an issue on GitHub.