Skip to content

johndww/serverless-create-global-dynamodb-table

 
 

Repository files navigation

serverless-create-global-dynamodb-table-2

serverless

This is a fork of serverless-create-global-dynamodb-table with additional bugfixes.

A serverless plugin to automatically creates and cleans up dynamodb global table(s). The plugin will create the dynamodb table in the specified region(s) and setup sync between primary and other table(s).

Install

npm install --save-dev serverless-create-global-dynamodb-table-2

Add the plugin to your serverless.yml file:

plugins:
  - serverless-create-global-dynamodb-table-2

Configuration

custom:
  globalTables:
    - regions: # list of regions in which you want to set up global tables
      - region-1
      - region-2
    tableName: 'TABLE_NAME' # *RECOMMENDED* if table is not part of the service then specify the table name. If tableKey param exists then tableName is ignored.
    tableKey: 'TABLE_KEY' # Cloudformation output key name if the table is created as part of same serverless service. does not support resource removal
    tags: # List of tags that needs to applied to the new table (optional)
      - Key: tag-key
        Value: tag-value
      - Key: tag-key-2
        Value: tag-value-2

**Global table cleanup is currently only supported using tableName configuration

About

serverless plugin that would create global dynamodb tables for specified tables

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%