The Drupal DynamoDB module provides integration with AWS DynamoDB services.
Current integration provides a basic database wrapper for use with DynamoDB.

There is a Drupal-based wrapper implementation, but you can directly access DynamoDB without the Drupal connection layer (raw connection).

The Drupal wrapper is minimalistic and except passing your query params to the DynamoDB handles errors, consistent read settings (see README), avoiding pagination of results, etc.

For what I can use this module?

  • You can create your custom tables for your specific needs.
  • There is a KeyValueStore submodule which acts as a drop-in replacement for the core implementation

Features

  • DynamoDB table CRUD operations: create, delete, update and list tables
  • DynamoDB write, read, update and query data.
  • Option to use multiple DynamoDB instances.
  • Granular settings per each DynamoDB instance / table.
  • Database service which follows core connection layer
  • Ability to query default instance or any other.
  • Simplicity in use as any other database implementation.

Implemented methods
Data querying:

  • query
  • scan
  • getItem
  • putItem
  • updateItem
  • deleteItem
  • batchWriteItem
  • batchGetItem

Table actions:

  • createTable
  • updateTable
  • deleteTable
  • listTables

Syntax comparison with the core database layer
Initialize connection - default instance

# Drupal core MySQL.
Drupal::database();

# DynamoDB - access to DynamoDB through Drupal wrapper.
DynamoDb::database();

# DynamoDB - access directly to DynamoDB, without Drupal wrapper.
DynamoDb::rawDatabase();

Select

# Drupal core MySQL.
Drupal::database()->select(....;

# DynamoDB
DynamoDb::database()->query(.....;

Please refer to README how to setup connection details, and examples of query syntax for DynamoDB. As well check DynamoDB documentation .

Supporting organizations: 
Development & Maintenance

Project information

Releases