3.0.6 • Published 2 years ago

aws-client v3.0.6

Weekly downloads
14
License
ISC
Repository
github
Last release
2 years ago

aws-client

Minimalist Node.js client for AWS services

Currently Supports:

  • DynamoDB (get, batchGet, put, batchPut, query) - DynamoClient
  • SNS (publish) - SNSClient

Installation

npm install aws-client

If you are using any v1 functions (i.e. function name does not end in v2), then you must also install aws-sdk:

npm install aws-sdk

aws-client v2 functions do not require any additional imports as this package imports the required modular packages (new AWS SDK v3 feature). Eventually all v1 packages will migrate to aws-client v2

Import

You can import one or many clients depending on what you need:

ES6 Import:

import { DynamoClient, SNSClient } from 'aws-client'

CommonJS:

const { DynamoClient, SNSClient } = require('aws-client')

Usage

const client = new DynamoClient({
  region: 'eu-west-1',
  tableName: 'users-prod'
})

const getUser = async (id) => {
  const data = await client.get({ id })
  console.log(data)
}

getUser('fred')

If there is a DynamoDB table called users-prod in your AWS account containing an item with the primary key (id) of 'fred', the above code will print it to the console.

3.0.4

2 years ago

3.0.6

2 years ago

3.0.5

2 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.7

3 years ago

2.0.6

3 years ago

2.0.9

3 years ago

2.0.8

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

2.0.15

3 years ago

2.0.16

3 years ago

2.0.13

3 years ago

2.0.14

3 years ago

2.0.11

3 years ago

2.0.12

3 years ago

2.0.10

3 years ago

2.0.17

3 years ago

1.2.1

3 years ago

1.2.0

4 years ago

1.1.25

4 years ago

1.1.24

4 years ago

1.1.23

4 years ago

1.1.22

4 years ago

1.1.21

4 years ago

1.1.20

5 years ago

1.1.19

6 years ago

1.1.18

6 years ago

1.1.17

6 years ago

1.1.16

6 years ago

1.1.15

6 years ago

1.1.14

6 years ago

1.1.13

6 years ago

1.1.12

6 years ago

1.1.11

6 years ago

1.1.10

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago

1.0.1

7 years ago