2017 © Pedro Peláez
 

library dynamo-session-bundle

DynamoDB Session Handler Bundle for Symfony 2

image

gwk/dynamo-session-bundle

DynamoDB Session Handler Bundle for Symfony 2

  • Monday, October 30, 2017
  • by gwkunze
  • Repository
  • 2 Watchers
  • 13 Stars
  • 162,377 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 13 Forks
  • 5 Open issues
  • 9 Versions
  • 5 % Grown

The README.md

DynamoDb Session Handler bundle

This Symfony 2.x bundle allows you to use the DynamoDb Web Service to store your sessions, (*1)

Starting from version 1.0 this bundle requires the AWS PHP SDK version 3.0+, if you're using the 2.x SDK use the latest 0.x version, (*2)

Installation

Simply add the following to your composer.json file, (*3)

{
    "require": {
        "gwk/dynamo-session-bundle": "1.*"
    }
}

And use composer to install the bundle:, (*4)

composer.phar update gwk/dynamo-session-bundle

Now add the bundle to your app/AppKernel.php:, (*5)

$bundles[] = new GWK\DynamoSessionBundle\GWKDynamoSessionBundle();

Configuration

Add the following configuration setting to your app/config/config.yml, (*6)

framework:
    session:
        handler_id: dynamo_session_handler

gwk_dynamo_session:
    table: my_session_table # DynamoDb Table to store sessions in
    locking_strategy: pessimistic # See AWS PHP documentation for valid values
    # dynamo_client_id: my_dynamodb_service # If you already use DynamoDb and you have a AWS\DynamoDb\DynamoDbClient service, you can make the session handler use it
    automatic_gc: true # Whether to use PHP's internal automatic garbage collection. The AWS sdk doesn't recommend it but doesn't explain why
    gc_batch_size: 25 # Maximum number of sessions the garbage collector deletes when garbage collection is started (manually or automatic)
    session_lifetime: 3600 # Number of seconds after which idle sessions should be garbage collected
    read_capacity: 10 # Default read capacity
    write_capacity: 10 # Default write capacity
    aws:
        region: us-east-1 # AWS Region to use
        version: latest # AWS API version
        credentials:
            key: AKA123456789 # Your AWS key
            secret: abcdeffhij # Your AWS secret

If you use AWS IAM Roles and your instance's permissions allow access to the appropriate DynamoDb Table you can leave out the credentials., (*7)

If the table does not exist the bundle will create the table for you with the specified capacities. Once the table is created the capacity configuration values are no longer used (unless the table is deleted)., (*8)

FAQ

Fixing cURL error #77

Certain versions of CentOS AWS AMIs may need this additional php.ini configuration to fix this exception:, (*9)

curl.cainfo="/etc/ssl/certs/ca-bundle.crt" 

Source: http://stackoverflow.com/a/26269489, (*10)

License

MIT, See LICENSE, (*11)

The Versions

30/10 2017

dev-master

9999999-dev

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb

11/02 2016

1.0

1.0.0.0

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb

11/02 2016

0.7

0.7.0.0

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb

30/01 2015

0.6

0.6.0.0

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb

30/01 2015

0.5

0.5.0.0

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb

25/11 2014

0.4

0.4.0.0

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb

25/02 2013

0.3

0.3.0.0

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb

25/02 2013

0.2

0.2.0.0

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb

21/02 2013

0.1

0.1.0.0

DynamoDB Session Handler Bundle for Symfony 2

  Sources   Download

MIT

The Requires

 

by Gijs Kunze

bundle symfony aws session dynamodb