DyanamoDB connection issue - aws-sdk for NodeJs - Inside Docker

0

DDB connection is succeeded and 'listTables' API works (although with a huge delay) but when I try to fetch anything with DocumentClient using the NodeJs's 'aws-sdk', I'm seeing this error:

{

"message": "CRC32 integrity check failed",

"code": "CRC32CheckFailed",

"retryable": true,

"time": "2022-02-02T19:53:18.508Z",

"statusCode": 200

}

note: this is occurring only when the app is running from within the docker whereas outside the docker it is working fine.

Solutions Tried:

As per the solution given here, tried adding '{dynamoDbCrc32: false}' like this:

var AWS = require("aws-sdk");

AWS.config.update({
    dynamoDbCrc32: false
});

var dynamodb = new AWS.DynamoDB({dynamoDbCrc32: false});
const dynamodbClient = new AWS.DynamoDB.DocumentClient({dynamoDbCrc32: false});

but still, I'm facing the above issue.

note: I'm using the latest version:

"aws-sdk": "^2.1067.0"

any inputs would be helpful!

Solution:

after I deleted and recreated the docker containers, the issue was resolved, probably adding this flag ‘{dynamoDbCrc32: false}’ works

2개 답변
0
수락된 답변

after I deleted and recreated the docker containers, the issue was resolved, probably adding this flag ‘{dynamoDbCrc32: false}’ works.

but the execution is very slow when compared to the localhost, any inputs on that would be helpful as well

Saru
답변함 2년 전
0

Which version of the SDK are you using? Can you first ensure you update to the latest version?

profile pictureAWS
전문가
답변함 2년 전
  • hi, thanks for the reply.

    I'm using the latest version: "aws-sdk": "^2.1067.0"

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠