serverless-create-global-dynamodb-table-2

1.0.3 • Public • Published

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

Package Sidebar

Install

npm i serverless-create-global-dynamodb-table-2

Weekly Downloads

17

Version

1.0.3

License

Apache 2.0

Unpacked Size

55.8 kB

Total Files

14

Last publish

Collaborators

  • johndww