Error, load json to dynamoDb [Remote]

82 views
Skip to first unread message

oscar eli ramos de oliveira

unread,
Mar 24, 2016, 4:47:35 PM3/24/16
to DynamoDb driver for Node.js
   
     Hi people,

      I have a problem with dynamoDb. I try load data for table  and an error ocurred:


Unable to add content <name_of_file or anything...> . Error JSON: {
 "message": "Unexpected token <",
 "code": "SyntaxError",
 "time": "2016-03-24T20:36:03.609Z",
 "statusCode": 403,
 "retryable": false,
 "retryDelay": 0
}

    In local dynamoDb, that's right! I was update, npm, node....


   Any idea?


Itzehel Sakar

unread,
Sep 20, 2016, 8:17:46 PM9/20/16
to DynamoDb driver for Node.js
Hi Eli,

Maybe you resolved your issue already but anyway I will suggest my solutions for the same error. In general I didn't have any issue to run DynamoDB locally but when I was trying to use the remote access, then I got the same error. So, in my case I was using a proxy configuration that was working:
 

var proxy = require('proxy-agent');


AWS.config.update({

   accessKeyId: key,

   secretAccessKey: sKey,

   region: "us-east-1",

   endpoint: "https://dynamodb.us-east-1.amazonaws.com",

              httpOptions:{ agent: proxy('http://proxy.domain.com:8080/') }

});


 Then I change my computer and then I start to get the error you had, then I just delete the httpOptions and everything worked again:
 

AWS.config.update({

       accessKeyId: key,

       secretAccessKey: sKey,

       region: "us-east-1",

       endpoint: "https://dynamodb.us-east-1.amazonaws.com

});

 So, that kind of error in general I could say is something wrong trying to establish the connection.

I hope this could help to somebody.

Itzehel
Reply all
Reply to author
Forward
0 new messages