aws-v3-sdk 2.0.3 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  [![NPM downloads](https://img.shields.io/npm/dm/aws-v3-sdk.svg)](https://www.npmjs.com/package/aws-v3-sdk)
5
5
 
6
6
 
7
- ## Version 3.x
7
+ ## Version 2.x
8
8
 
9
9
  This package can be used to migrate to AWS SDK v3 from AWS SDK v2 without much change in exisint codebase.
10
10
  This package takes the exisint AWS SDK v2 format and convert it to the AWS SDK v3 format.
package/clients/lambda.js CHANGED
@@ -23,7 +23,9 @@ class Lambda {
23
23
  async invoke (params, callback) {
24
24
  const command = new InvokeCommand(params)
25
25
  this.client.send(command).then(response => {
26
- response.Payload = toUtf8(response.Payload)
26
+ if (response.Payload) {
27
+ response.Payload = toUtf8(response.Payload)
28
+ }
27
29
  callback(null, response)
28
30
  }).catch(err => {
29
31
  callback(err)
@@ -34,7 +36,9 @@ class Lambda {
34
36
  return new Promise((resolve, reject) => {
35
37
  const command = new InvokeCommand(params)
36
38
  this.client.send(command).then(response => {
37
- response.Payload = toUtf8(response.Payload)
39
+ if (response.Payload) {
40
+ response.Payload = toUtf8(response.Payload)
41
+ }
38
42
  resolve(response)
39
43
  }).catch(err => {
40
44
  resolve(err)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-v3-sdk",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "description": "AWS v3 SDK Utils",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,6 +13,9 @@
13
13
  "author": "tomy mathew",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
+ "@aws-sdk/client-lambda": "^3.1097.0",
17
+ "@aws-sdk/node-http-handler": "^3.374.0",
18
+ "@aws-sdk/util-utf8-node": "^3.259.0",
16
19
  "@opensearch-project/opensearch": "^2.3.1"
17
20
  }
18
21
  }