Comments (5)
my guess is that you had your credentials specified on your previous environment, but do not on your new one, as code in this path hasn't changed for a few months. have you tried specifying your credentials in the environment?
from dynamo.
@jed thanks for the quick reply
Yes I tried to add the credentials on my environment but the result was the same.
The thing is that on the computer that was working before, I run again npm install dynamo and now is not working anymore.
Might be something wrong with at npm level?
Current dynamo/package.json is
{
"name": "dynamo",
"version": "1.0.1",
"description": "A high-level interface for using DynamoDB",
"main": "index.js",
"keywords": [
"amazon",
"aws",
"DynamoDB",
"dynamo",
"nosql",
"database"
],
"repository": {
"type": "git",
"url": "https://github.com/jed/dynamo.git"
},
"scripts": {
"test": "node test.js"
},
"license": "MIT",
"dependencies": {
"dynamo-client": "~0.1.0"
},
"devDependencies": {
"should": "~0.6.3",
"mocha": "~1.3.0"
},
"readme": "db = dynamo.createClient(host, [credentials])\n\ndynamo.Database::batch BatchWriteItem / BatchGetItem\n\ndynamo.Tables::add CreateTable\ndynamo.Tables::load ListTables\n\ndynamo.Table::destroy DeleteTable\ndynamo.Table::load DescribeTable\ndynamo.Table::scan Scan\ndynamo.Table::query Query\n\ndynamo.Capacity::set UpdateTable\ndynamo.Capacity::on (\"consumed\", function(amt){})\n\ndynamo.Item::destroy DeleteItem\ndynamo.Item::load GetItem\ndynamo.Item::update UpdateItem\ndynamo.Item::set PutItem\n\n* > database > table > item > attribute\n\nUser = new db.Table(\"users\")\n\n",
"_id": "[email protected]",
"_from": "dynamo"
}
and dynamo/node_modules/dynamo-client/package.json is
{
"name": "dynamo-client",
"version": "0.1.2",
"description": "A low-level client for accessing DynamoDB",
"author": {
"name": "Jed Schmidt",
"email": "[email protected]",
"url": "http://jed.is"
},
"main": "index.js",
"keywords": [
"amazon",
"aws",
"DynamoDB",
"dynamo",
"nosql",
"database"
],
"repository": {
"type": "git",
"url": "https://github.com/jed/dynamo-client.git"
},
"license": "MIT",
"devDependencies": {
"should": "~0.6.3",
"mocha": "~1.3.0"
},
"scripts": {
"pretest": "mocha ./test/setup.js -b -t 100s -R list",
"test": "mocha ./test/test.js -b -t 100s -R list",
"posttest": "mocha ./test/teardown.js -b -t 100s -R list"
},
"readme": "dynamo-client\n=============\n\n[![Build Status](https://secure.travis-ci.org/jed/dynamo-client.png?branch=master)](http://travis-ci.org/jed/dynamo-client)\n\nThis is a low-level client for accessing DynamoDB. It was factored out of [dynamo](http://github.com/jed/dynamo) to separate concerns for better testability.\n\nExample\n-------\n\n```javascript\n// assuming AWS credentials are available from process.ENV\nvar dynamo = require(\"dynamo-client\")\n , host = \"dynamodb.us-east-1.amazonaws.com\"\n , db = dynamo.createClient(host)\n\ndb.request(\"ListTables\", null, function(err, data) {\n console.log(data.TableNames.length + \" tables found.\")\n})\n```\n\nAPI\n---\n\n### db = dynamo.createClient(host, [credentials])\n\nThis creates a database instance for the given DynamoDB host, which can currently be one of the following:\n\n- `dynamodb.us-east-1.amazonaws.com` (Virginia)\n- `dynamodb.us-west-1.amazonaws.com` (Northern California)\n- `dynamodb.us-west-2.amazonaws.com` (Oregon)\n- `dynamodb.ap-northeast-1.amazonaws.com` (Tokyo)\n- `dynamodb.ap-southeast-1.amazonaws.com` (Singapore)\n- `dynamodb.eu-west-1.amazonaws.com` (Ireland)\n\nYour AWS credentials (which can be found in your [AWS console](https://portal.aws.amazon.com/gp/aws/securityCredentials)) can be specified in one of two ways:\n\n- As the second argument, like this:\n\n```javascript\ndynamo.createClient(\"dynamodb.us-east-1.amazonaws.com\", {\n secretAccessKey: \"<your-secret-access-key>\",\n accessKeyId: \"<your-access-key-id>\"\n})\n```\n\n- From `process.env`, such as like this:\n\n```\nexport AWS_SECRET_ACCESS_KEY=\"<your-secret-access-key>\"\nexport AWS_ACCESS_KEY_ID=\"<your-access-key-id>\"\n```\n\n### db.request(targetName, data, callback)\n\nDatabase instances have only one method, `request`, which takes a target name, data object, and callback.\n\nThe target name can be any of the [operations available for DynamoDB](http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/operationlist.html\n), which currently include the following:\n\n- `BatchGetItem`\n- `BatchWriteItem`\n- `CreateTable`\n- `DeleteItem`\n- `DeleteTable`\n- `DescribeTable`\n- `GetItem`\n- `ListTables`\n- `PutItem`\n- `Query`\n- `Scan`\n- `UpdateItem`\n- `UpdateTable`\n\nThe data object needs to serialize into the [DynamoDB JSON format](http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/DataFormat.html).\n\nThe callback is a function with the usual node-style `(err, data)` signature, in which data is an object parsed from the JSON returned by DynamoDB.\n\nTo match [AWS expectations](http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/ErrorHandling.html#APIRetries), the following requests are automatically retried with exponential backoff (50ms, 100ms, 200ms, 400ms, etc) upon failure:\n\n- 500 errors\n- 503 errors\n- 400 ProvisionedThroughputExceededException errors\n\nRetries are attempted up to 10 times by default, but this amount can be changed by setting `dynamo.Request.prototype.maxRetries` to the desired number.\n",
"_id": "[email protected]",
"_from": "dynamo-client@~0.1.0"
}
from dynamo.
oh wow, good call @CaDs. looks like i published to npm from my development branch. bad me! just republished so can you try pulling again?
from dynamo.
Ok, working again!
Thanks a lot :)
from dynamo.
great, sorry about that hiccup.
from dynamo.
Related Issues (20)
- createClient() with optional sessionToken HOT 3
- writing multibyte characters creates invalidserviceexceptions HOT 4
- Feature request: Deleting items HOT 3
- require table schema HOT 3
- clarify retry strategy HOT 8
- keep track of capacity units
- support BatchWriteItems in the high-level API HOT 1
- add support for other zones HOT 2
- Predicates + Update.when() HOT 3
- please tag versions on github HOT 3
- Update with an attribute set to zero does not work HOT 2
- item.save(callback) not implemented HOT 1
- How can I use pagination?
- item.destroy doesn't actually do anything HOT 2
- AWS SDK - Doesn't seem as good as your library HOT 1
- error while retrieving and adding data HOT 2
- error getting started
- publish latest to npm HOT 2
- schema specification shouldn't rely on object key order HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamo.