1.0.34 • Published 4 months ago

aws-v3-sdk v1.0.34

Weekly downloads
-
License
ISC
Repository
-
Last release
4 months ago

AWS SDK for JavaScript

NPM version NPM downloads

Version 2.x

This package can be used to migrate to AWS SDK v3 from AWS SDK v2 without much change in exisint codebase. This package takes the exisint AWS SDK v2 format and convert it to the AWS SDK v3 format.

AWS SDK V2

const AWS = require('aws-sdk')
const docClient = new AWS.DynamoDB.DocumentClient()
let params = {
    TableName: TABLE_NAME,
    Key: {
      'id': ID
    }
}
docClient.get(params, function (err, data) {
    console.log(data.Item)
  })

AWS SDK V3

const AWS = require('aws-v3-sdk')
const docClient = new AWS.DynamoDB.DocumentClient()
let params = {
    TableName: TABLE_NAME,
    Key: {
      'id': ID
    }
}
docClient.get(params, function (err, data) {
    console.log(data.Item)
})

Table of Contents:

Supported Functions

  1. Dynamo DB
  2. Lambda
  3. OpenSearch
  4. Cognito
  5. S3
  6. SNS
  7. SQS
  8. STS
  9. Cognito

Getting Started

How To Install

In Node.js

The preferred way to install the AWS SDK for Node.js is to use the npm package manager for Node.js. Simply type the following into a terminal window:

npm install aws-v3-sdk

Then within your application, you can reference the react native compatible version of the SDK with the following: We can use the old SDK format without migrating the code base. Just update the AWS import.

const AWS = require('aws-v3-sdk')

const s3 = new AWS.S3()

const params = {
	Bucket: <BUCKET NAME>,
	Key: <FILE KEY>,
	Body: <STRING DATA,
	ContentType: 'text/json'

}

s3.putObject(params, (err, data) => {
	if (err) {
		< DO Stuff HERE >
	} else {
		< DO Stuff HERE >
	}
})

Supported Functions

Dynamo DB get query scan put delete update batchWrite transactWrite batchGet

S3 getSignedUrl getObject putObject headObject createMultipartUpload completeMultipartUpload

Known Limitations

There are a few known limitations.

  • This package has not been updated to handle all the AWS SDK APIs.

Contributing

We welcome community contributions and pull requests. See CONTRIBUTING.md for information on how to set up a development environment and submit code.

License

This SDK is distributed under the Apache License, Version 2.0, see LICENSE.txt and NOTICE.txt for more information.

1.0.34

4 months ago

2.0.3

4 months ago

2.0.4

4 months ago

1.0.33

1 year ago

1.0.32

1 year ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.31

2 years ago

1.0.30

2 years ago

1.0.29

2 years ago

1.0.28

2 years ago

1.0.27

2 years ago

1.0.26

2 years ago

1.0.25

2 years ago

1.0.24

2 years ago

1.0.23

2 years ago

1.0.22

2 years ago

1.0.21

2 years ago

1.0.20

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago