You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are now able to pass configuration options to the library. Notably, you are able to pass options to the [AWS.DynamoDB.DocumentClient](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#constructor-property) constructor, for example if you want to run against a [Dynamodb Local](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html) instance while developing. Allowing options to be passed means that the wrapper now has to be configured before use. Previously you could just use the wrapper directly:
5
+
You are now able to pass configuration options to the library. Notably, you are able to pass options to the [AWS.DynamoDB.DocumentClient](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/DynamoDB/DocumentClient.html#constructor-property) constructor, for example if you want to run against a [Dynamodb Local](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html) instance while developing. Allowing options to be passed means that the wrapper has to be configured before use. Previously you could just use the wrapper directly:
Now it is a factory function and so needs to be invoked before use. This means that you will almost certainly want to add a file that creates an instance of the wrapper, configured how you see fit, and that then exports the configured instance. You would then require this file wherever in your service you need to access Dynamodb:
Copy file name to clipboardexpand all lines: README.md
+45-36
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,14 @@ methods, returning the results as Promises.
18
18
```
19
19
$ npm install --save dynamodb-doc-client-wrapper
20
20
```
21
+
21
22
or
23
+
22
24
```
23
25
$ yarn add dynamodb-doc-client-wrapper
24
26
```
25
27
26
-
You also need to have the `aws-sdk` package available as a peer dependency. When running AWS Lambda functions on AWS, that package is already installed; you can install it as a dev dependency so it is available locally when testing.
28
+
You also need to have the `aws-sdk` package available as a peer dependency. When running AWS Lambda functions on AWS, that package is already installed; you can install `aws-sdk` as a dev dependency so it is available locally when testing.
27
29
28
30
## Usage
29
31
@@ -32,8 +34,8 @@ You also need to have the `aws-sdk` package available as a peer dependency. When
32
34
You should create one client wrapper instance in a file that you then require where needed elsewhere in your service. If you do not need to configure the wrapper, you can create this basic file...
0 commit comments