Skip to content

aws sdk v3 update #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@ To run the below example, run:
```javascript
"use strict";

const AWS = require("aws-sdk");
const AWS = require("@aws-sdk/client-dynamodb");
const DynamoDBLockClient = require("../index.js");

const dynamodb = new AWS.DynamoDB.DocumentClient(
{
region: "us-east-1"
}
);
const dynamodb = new AWS.DynamoDB({
credentials: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
},
region: process.env.AWS_REGION,
endpoint: process.env.DDB_ENDPOINT
})

// "fail closed": if process crashes and lock is not released, lock will
// never be released (requires human intervention)
Expand Down
15 changes: 9 additions & 6 deletions examples/readme.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
"use strict";

const AWS = require("aws-sdk");
const AWS = require("@aws-sdk/client-dynamodb");
const DynamoDBLockClient = require("../index.js");

const dynamodb = new AWS.DynamoDB.DocumentClient(
{
region: "us-east-1"
}
);
const dynamodb = new AWS.DynamoDB({
credentials: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY
},
region: process.env.AWS_REGION,
endpoint: process.env.DDB_ENDPOINT
})

// "fail closed": if process crashes and lock is not released, lock will
// never be released (requires human intervention)
Expand Down
Loading