1.1.5 • Published 2 years ago

serverless-dynamo-build v1.1.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Serverless Dynamo Build npm

A plugin to buld Dynamo DB with data for Serverless Framework.

Use Case

  • Populate Data into Dynamo during deployment through serverless. Can prevent additonal usage of lambdas for populating data into Dynamo DB,once the serverless deploy is completed

Install

Run npm install in your Serverless project.

$ npm install --save serverless-dynamo-build

Add the plugin to your serverless.yml file

plugins:
  - serverless-dynamo-build

Setup

custom:
  dynamoBuild:
#   noOperation will determine if the below operations will be executed or not ( noOperation=true will ignore the below statements)
  noOperation: false
  # Multiple operations for multiple tables can be provided here
  config:
    - table: event
      operation: UPDATE
    #   params contain multiple record details that needs to be inserted in the table
      params:
        - hashKey: eventPath
          hashValue: name/{id}
          rangeKey: eventData
          rangeValue: eventValue
        #   updateKeys holds the set of fields that needs to be inserted
          updateKeys: 
            - scope
            - scope1
        #   updateValues holds the set of values that needs to be inserted for the above fields
          updateValues: 
            - - scope/1
              - scope/2
            - - scope1/1
              - scope1/2
        - hashKey: eventPath
          hashValue: description/{desc}
          updateKeys: 
            - scope
          updateValues: 
            - - scope/SCOPE3
              - scope/SCOPE4
    - table: event
      operation: DELETE
      params:
        - hashKey: eventPath
          hashValue: address/{id}


## Usage

Run `sls deploy`, Dynamo DB table will populated with data.

Run 'sls deploy --noDynamoBuild` if dynamo db population is not required

Run `sls dynamo build` to build up the dynamo db with values
1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago