Skip to content
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

doc: update installation guide for aws v3 #583

Merged
merged 1 commit into from
Sep 10, 2023
Merged
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
doc: update installation guide for aws v3
  • Loading branch information
suenalaba committed Sep 10, 2023
commit 1cefa48836dfdd50107bd4d1a031f0095b18e97a
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
Loading