Skip to content

Commit

Permalink
doc: update installation guide for aws v3 (#583)
Browse files Browse the repository at this point in the history
  • Loading branch information
suenalaba committed Sep 10, 2023
1 parent 26b9e34 commit a59efdf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
21 changes: 17 additions & 4 deletions docs/docs/introduction/quick-start.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Quick Start

## Install DynamoDB Toolbox
## Install DynamoDB Toolbox using aws-sdk v3 (>=v0.8.0) (recommended)

Using your favorite package manager, install DynamoDB Toolbox and aws-sdk v3 in your project by running one of the following commands:

```bash
# npm
npm i dynamodb-toolbox
npm install @aws-sdk/lib-dynamodb @aws-sdk/client-dynamodb

# yarn
yarn add dynamodb-toolbox
yarn add @aws-sdk/lib-dynamodb @aws-sdk/client-dynamodb

```

## Install DynamoDB Toolbox using aws-sdk v2 (<v0.8.0)

Using your favorite package manager, install DynamoDB Toolbox and aws-sdk v2 in your project by running one of the following commands:

Expand All @@ -14,7 +29,6 @@ yarn add dynamodb-toolbox
yarn add aws-sdk

```

## Add to your code

The `dynamodb-toolbox` package exports `Table` and `Entity` classes. Import or require them into your code as follows:
Expand All @@ -30,8 +44,7 @@ import { Table, Entity } from 'dynamodb-toolbox'
## Load the DocumentClient using aws-sdk v3 (>=v0.8.0)

```typescript title="TypeScript"
import { DynamoDB } from '@aws-sdk/client-dynamodb'
import { DynamoDBClient } from '@aws-sdk/client-dynamodb'
import { DynamoDB, DynamoDBClient } from '@aws-sdk/client-dynamodb'
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'

const marshallOptions = {
Expand Down
3 changes: 1 addition & 2 deletions docs/docs/introduction/what-is-dynamodb-toolbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ This library **DOES NOT** create DynamoDB Tables for you. You must create the ta
```typescript

// >=v0.8.0
import { DynamoDB } from '@aws-sdk/client-dynamodb'
import { DynamoDBClient } from '@aws-sdk/client-dynamodb'
import { DynamoDB, DynamoDBClient } from '@aws-sdk/client-dynamodb'
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb'

const marshallOptions = {
Expand Down

0 comments on commit a59efdf

Please sign in to comment.