A simple Symfony2 bundle to wrap the AWS SDK for PHP
DynamoDB Session Handler
for easy use in your Symfony >2.1 application.
For more info see: http://docs.aws.amazon.com/aws-sdk-php/guide/latest/feature-dynamodb-session-handler.html
Add the following to your projects composer.json
{
"require": {
"lightmaker/dynamo-session-handler-bundle": "1.0.*"
}
}
composer.phar update
# AppKernel.php
public function registerBundles() {
$bundles = array(
new Lightmaker\DynamoSessionHandlerBundle\LightmakerDynamoSessionHandlerBundle()
);
}
See the official AWS SDK for PHP DynamoDB Session Handler docs for more info on configuration:
http://docs.aws.amazon.com/aws-sdk-php/guide/latest/feature-dynamodb-session-handler.html#configuration
# app/config/config.yml
lightmaker_dynamo_session_handler:
table_name:
hash_key:
session_lifetime:
consistent_read:
locking_strategy:
automatic_gc:
gc_batch_size:
gc_operation_delay:
max_lock_wait_time:
min_lock_retry_microtime:
max_lock_retry_microtime:
# app/config/config.yml
framework:
session:
handler_id: dynamoSessionHandler