serverless-slack icon indicating copy to clipboard operation
serverless-slack copied to clipboard

Configurable DynamoDB DocumentClient

Open jacekelgda opened this issue 7 years ago • 0 comments

https://github.com/johnagan/serverless-slack/blob/master/src/dynamo.js#L4

To work with the offline local environment using serverless plugins:

plugins:
  - serverless-dynamodb-local
  - serverless-offline

additional configuration of DocumentClient is required. Since Dynamo service is a hardcoded dependency there is no way to inject it on the implementation level. Two ways of resolving this issue:

  1. Using env variables for DocumentClient config ( like in here, but with additional params: https://github.com/serverless/serverless-slack/blob/master/lib/models/team.js#L12 )
  2. Dependency injection model

Please discuss.

jacekelgda avatar Mar 23 '18 13:03 jacekelgda