PHP code example of cuppett / cakephp-aws_utils

1. Go to this page and download the library: Download cuppett/cakephp-aws_utils library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cuppett / cakephp-aws_utils example snippets


use Aws\Common\Enum\Region;

$aws = 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)
));