Serverless Create Global Dynamodb Table

homepage icon https://github.com/rrahul963/serverless-create-global-dynamodb-table
Follow @rrahul963

Tracked

NPM Downloads Last Month
26
Issues
4
Stars
6
Forks
3
Watchers
6
Watch Star Fork Issue Download License NPM Build Status Coverage Status Contributors

Repo README Contents:

serverless-create-global-dynamodb-table

serverless

A serverless plugin to automatically creates 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

Add the plugin to your serverless.yml file:

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

Configuration

custom:
  globalTables:
  - regions: # list of regions in which you want to set up global tables
      - region-1
      - region-2
    tableKey: 'TABLE_KEY' # Cloudformation output key name if the table is created as part of same serverless service
    tableName: 'TABLE_NAME' # if table is not part of the service then specify the table name. If tableKey param exists then tableName is ignored.
    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