Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL error when connecting to a local DynamoDB instance #88

Closed
mdonnellyli opened this issue Oct 4, 2016 · 2 comments
Closed

SSL error when connecting to a local DynamoDB instance #88

mdonnellyli opened this issue Oct 4, 2016 · 2 comments

Comments

@mdonnellyli
Copy link

When trying to access a local instance of DynamoDB we are getting an error connecting

Sample Code
`var credentials = {
accessKeyId: '',
secretAccessKey: '<YOUR_SECRET_ACCESS_KEY>'
};
var dynasty = require('dynasty')(credentials, 'localhost:8000');

var user = dynasty.table('Music'),
promise = user.find('No One You Know');
console.log(promise)
promise.then(function(user) {
console.log('********')
console.log(user)
});
`

Error

`Promise {
_bitField: 0,
_fulfillmentHandler0: undefined,
_rejectionHandler0: undefined,
_progressHandler0: undefined,
_promise0: undefined,
_receiver0: undefined,
_settledValue: undefined }
Unhandled rejection Error: write EPROTO 140735176974336:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794:

at exports._errnoException (util.js:907:11)
at WriteWrap.afterWrite (net.js:785:14)`
@mdonnellyli
Copy link
Author

Solved it with this:

var dynasty = require('dynasty')(credentials, 'http://localhost:8000');

@victorquinn
Copy link
Owner

Ahh good catch, I should add something like that to the docs. When the protocol is omitted, it assumes https which won't play nicely on a local instance like that. Sorry for the frustration!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants