2017 © Pedro Peláez
 

silverstripe-vendormodule dynamodb

SilverStripe DynamoDB integration.

image

silverstripe/dynamodb

SilverStripe DynamoDB integration.

  • Monday, November 20, 2017
  • by stojg
  • Repository
  • 8 Watchers
  • 2 Stars
  • 34,953 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 9 Forks
  • 0 Open issues
  • 18 Versions
  • 9 % Grown

The README.md

SilverStripe DynamoDB

Build Status, (*1)

This module enables storing SilverStripe sessions in DynamoDB., (*2)

Requirements

  • SilverStripe 4.0+
  • PHP 5.6+

Installation

Add these custom repositories to your composer.json, (*3)

composer require silverstripe/dynamodb

Sessions with DynamoDB

If you wish to store sessions in DynamoDB, set the required environment variables in .env:, (*4)

// the name of the DynamoDB table to store sessions in
AWS_DYNAMODB_SESSION_TABLE=mysession

// the region that the DynamoDB table will live in (in this example here it uses Sydney)
AWS_REGION_NAME=ap-southeast-2

Once these are in place, this module will configure DynamoDB and register that as the session handler., (*5)

Before you can actually use this, you need to create a table in which to store the sessions. Follow the instructions in the AWS SDK for PHP documentation., (*6)

IMPORTANT: You need to set up a TTL attribute for garbage collection in your table. The module does not provide automated garbage collection abilities., (*7)

Using DynamoDB outside of AWS

Sometimes you'll want to test that DynamoDB sessions work on your local development environment. You can make that happen by defining AWS_ACCESS_KEY and AWS_SECRET_KEY. Please don't define these constants in the environment file in EC2 instances, as credentials are automatically handled by the IAM role inside of AWS., (*8)

// the AWS access key and secret. This is optional if you've configured an instance with an IAM role
// http://docs.aws.amazon.com/aws-sdk-php/guide/latest/credentials.html#caching-iam-role-credentials
AWS_ACCESS_KEY=my-access-key
AWS_SECRET_KEY=my-secret

Local Testing

You can simulate DynamoDB locally for easier development through DynamoDB Local., (*9)

Set environment constants. Note that actual access keys and regions are ignored, they just need to be defined., (*10)

AWS_DYNAMODB_SESSION_TABLE=mysession
AWS_ACCESS_KEY=my-access-key
AWS_SECRET_KEY=my-secret
AWS_DYNAMODB_ENDPOINT=http://localhost:8000
AWS_REGION_NAME=us-east-1

Download DynamoDB Local and start it - it'll be available under http://localhost:8000., (*11)

Now use the AWS CLI Tools to interact with your local DynamoDB., (*12)

Create table:, (*13)

aws dynamodb create-table --table-name mysession --attribute-definitions AttributeName=id,AttributeType=S --key-schema AttributeName=id,KeyType=HASH --provisioned-throughput ReadCapacityUnits=1,WriteCapacityUnits=1 --endpoint-url http://localhost:8000

List tables:, (*14)

aws dynamodb list-tables --endpoint-url http://localhost:8000

List all sessions:, (*15)

aws dynamodb scan --table-name mysession --endpoint-url http://localhost:8000

Delete all sessions (use create table to reset afterwards):, (*16)

aws dynamodb delete-table --table-name mysession --endpoint-url http://localhost:8000

Contribute

Do you want to contribute? Great, please see the CONTRIBUTING.md guide., (*17)

License

This module is released under the BSD 3-Clause License, see license.md., (*18)

Changelog

See the separate CHANGELOG.md, (*19)

Code of conduct

When having discussions about this module in issues or pull request please adhere to the SilverStripe Community Code of Conduct., (*20)

The Versions

20/11 2017

dev-master

9999999-dev

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

20/11 2017

4.0.1

4.0.1.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

14/06 2017

3.0.x-dev

3.0.9999999.9999999-dev

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

14/06 2017

3.0.0

3.0.0.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

14/06 2017

4.0.0

4.0.0.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

19/05 2017

dev-remove-gc

dev-remove-gc

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

16/11 2016

2.x-dev

2.9999999.9999999.9999999-dev

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

21/05 2016

dev-add-helpful-robot-badge

dev-add-helpful-robot-badge

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

19/05 2016

2.0.1

2.0.1.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

08/05 2016

2.0.0

2.0.0.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

aws silverstripe dynamodb

03/03 2016

1.1.x-dev

1.1.9999999.9999999-dev

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

aws silverstripe dynamodb

03/03 2016

v1.1.2

1.1.2.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

aws silverstripe dynamodb

03/03 2016

v1.1.1

1.1.1.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

aws silverstripe dynamodb

03/03 2016

1.2.0

1.2.0.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

aws silverstripe dynamodb

23/11 2015

1.1.0

1.1.0.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

aws silverstripe dynamodb

23/11 2015

1.0.2

1.0.2.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

aws silverstripe dynamodb

08/07 2015

1.0.1

1.0.1.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

aws silverstripe dynamodb

02/07 2015

1.0.0

1.0.0.0

SilverStripe DynamoDB integration.

  Sources   Download

BSD-3-Clause

The Requires

 

aws silverstripe dynamodb