Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
dynamodb-enhanced
Advanced tools
Simple DynamoDB Library for Node.js. enhanced version of dynamodb by Stanislas Polu
A Simple, efficient and complete DynamoDB driver for Node.js, with:
Discussion Group: http://groups.google.com/group/node-dynamodb
var ddb = require('dynamodb').ddb({ accessKeyId: '',
secretAccessKey: '' });
Available options for the constructor are the following:
accessKeyId
: the AWS AccessKeyId to usesecretAccessKey
: the AWS SecretAccessKey associatedendpoint
: the Region endpoint to use (defaults to: dynamodb.us-east-1.amazonaws.com
)agent
: The NodeJS http.Agent to use (defaults to: undefined
)sessionToken
: forced temporary session credential (defaults to: undefined
)sessionExpires
: forced temeporary session credential (defaults to: undefined
)ddb.createTable('foo', { hash: ['id', ddb.schemaTypes().string],
range: ['time', ddb.schemaTypes().number] },
{read: 10, write: 10}, function(err, details) {});
// res: { "CreationDateTime": 1.310506263362E9,
// "KeySchema": { "HashKeyElement": { "AttributeName": "AttributeName1",
// "AttributeType": "S"},
// "RangeKeyElement": { "AttributeName": "AttributeName2",
// "AttributeType": "N"} },
// "ProvisionedThroughput":{ "ReadCapacityUnits": 5,
// "WriteCapacityUnits": 10 },
// "TableName":"Table1",
// "TableStatus":"CREATING" }
ddb.listTables({}, function(err, res) {});
// res: { LastEvaluatedTableName: 'bar',
TableNames: ['test','foo','bar'] }
ddb.describeTable('a-table', function(err, res) {});
// res: { ... }
// flat [string, number, string array or number array] based json object
var item = { score: 304,
date: (new Date).getTime(),
sha: '3d2d6963',
usr: 'spolu',
lng: ['node', 'c++'] };
ddb.putItem('a-table', item, {}, function(err, res, cap) {});
ddb.getItem('a-table', '3d2d6963', null, {}, function(err, res, cap) {});
// res: { score: 304,
// date: 123012398234,
// sha: '3d2d6963',
// usr: 'spolu',
// lng: ['node', 'c++'] };
ddb.deleteItem('a-table', 'sha', null, {}, function(err, res, cap) {});
ddb.updateItem('a-table', '3d2d6963', null, { 'usr': { value: 'smthg' } }, {},
function(err, res, cap) {});
ddb.consumedCapacity();
ddb.batchGetItem({'table': { keys: ['foo', 'bar'] }}, function(err, res) {
if(err) {
console.log(err);
} else {
console.log(res);
}
});
// res: { ConsumedCapacityUnits: 1.5,
items: [...] };
//ddb.batchWriteItem(PutRequest, DeleteRequest, cb)
ddb.batchWriteItem({'table': [item1, item2]}, {'table': ['foo', 'bar']}, function(err, res) {
if(err) {
console.log(err);
} else {
console.log(res);
}
});
// res: { UnprocessedItems: { ... } };
ddb.query('test', '{id: 3d2d6963}',{id: 'EQ'} ,{filter:{keys:{foo:12},operators:{foo:'GT'}}}, function(err, res, cap) {...});
// res: { count: 23,
// lastEvaluatedKey: { hash: '3d2d6963' },
// items: [...] };
ddb.scan('test', {}, function(err, res) {
if(err) {
console.log(err);
} else {
console.log(res);
}
});
// res: { count: 23,
// lastEvaluatedKey: { hash: '3d2d6963' },
// items: [...] };
More complete usage can be found in the examples directory
Put in your environment:
export DYNAMODB_ACCESSKEYID=YOURACCESSKEYID
export DYNAMODB_SECRETACCESSKEY=YOURSECRETKEYID
export DYNAMODB_TEST_TABLE1=test
Make sure you have a test
table created and available with sha
as a hash key (string), then run:
make test
Distributed under the MIT License.
@karlseguin (Karl Seguin)
@imekinox (Juan Carlos del Valle)
@phstc (Pablo Cantero)
@cstivers78 (Chris Stivers)
@garo (Juho Mäkinen)
@tax (Paul Tax)
@alexbosworth (Alex Bosworth)
@jimbly (Jimb Esser)
@n1t0 (Anthony Moi)
@krasin
@aws-ew-dev
FAQs
Simple DynamoDB Library for Node.js. enhanced version of dynamodb by Stanislas Polu
The npm package dynamodb-enhanced receives a total of 0 weekly downloads. As such, dynamodb-enhanced popularity was classified as not popular.
We found that dynamodb-enhanced demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.