Open kubrickfr opened 8 years ago
can you please paste your configuration object and the query command you are using?
var AWS = require('aws-sdk');
// Use bluebird implementation of Promise
var Promise = require('bluebird');
AWS.config.setPromisesDependency(require('bluebird'));
var dynamoCache = require('dynamo-cache');
var docClient = new AWS.DynamoDB.DocumentClient({apiVersion: '2012-08-10', region: "eu-west-1", endpoint: "dynamodb.eu-west-1.amazonaws.com", accessKeyId:"xx", secretAccessKey:"xx"});
docClient.configCache()
var paramsQuery= { TableName: 'XXXObjects',
IndexName: 'ParentID-date_created-index',
KeyConditionExpression: 'ParentID = :pid AND #CreateDate BETWEEN :afterDate AND :beforeDate',
ExpressionAttributeValues:
{ ':pid': 'FolCWpHq',
':afterDate': 0,
':beforeDate': 9007199254740991 },
ProjectionExpression: '#Name, #CreateDate, targets_total, targets_validated',
ExpressionAttributeNames: { '#Name': 'Name', '#CreateDate': 'date_created' } }
docClient.query(paramsQuery, (err, data) => {
if (err) {
console.log(JSON.stringify(paramsQuery));
reject(err);
} else {
resolve(data);
}
})
When trying to do docClient.query: