diff --git a/README.md b/README.md index f1e2812..845630c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,15 @@ If you wish to store sessions in DynamoDB, set the following environment variabl define('AWS_REGION_NAME', 'ap-southeast-2'); Once these are in place, this module will configure DynamoDB and register that as the session handler. -You will **need** to create the specified table using the AWS DynamoDB console for the region. + +To create a DynamoDB session table you can execute the following code: + +```php +DynamoDbSession::get()->getHandler()->createSessionsTable(5,5); +``` + +See http://docs.aws.amazon.com/aws-sdk-php/v2/guide/feature-dynamodb-session-handler.html#create-a-table-for-storing-your-sessions +for more information about `createSessionsTable` ## Using DynamoDB outside of AWS diff --git a/code/model/DynamoDbSession.php b/code/model/DynamoDbSession.php index 630d0b1..ffee3a7 100644 --- a/code/model/DynamoDbSession.php +++ b/code/model/DynamoDbSession.php @@ -1,7 +1,5 @@ handler; + } + /** * Get an instance of DynamoDbSession configured from the environment if available. * @return null|DynamoDbSession