{"action":"created","issue":{"url":"https://api.github.com/repos/automategreen/dynamoose/issues/64","repository_url":"https://api.github.com/repos/automategreen/dynamoose","labels_url":"https://api.github.com/repos/automategreen/dynamoose/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/automategreen/dynamoose/issues/64/comments","events_url":"https://api.github.com/repos/automategreen/dynamoose/issues/64/events","html_url":"https://github.com/automategreen/dynamoose/issues/64","id":176294328,"number":64,"title":"DynamoDB Local HTTPS Error","user":{"login":"fishcharlie","id":860375,"avatar_url":"https://avatars3.githubusercontent.com/u/860375?v=3","gravatar_id":"","url":"https://api.github.com/users/fishcharlie","html_url":"https://github.com/fishcharlie","followers_url":"https://api.github.com/users/fishcharlie/followers","following_url":"https://api.github.com/users/fishcharlie/following{/other_user}","gists_url":"https://api.github.com/users/fishcharlie/gists{/gist_id}","starred_url":"https://api.github.com/users/fishcharlie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fishcharlie/subscriptions","organizations_url":"https://api.github.com/users/fishcharlie/orgs","repos_url":"https://api.github.com/users/fishcharlie/repos","events_url":"https://api.github.com/users/fishcharlie/events{/privacy}","received_events_url":"https://api.github.com/users/fishcharlie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-12T04:52:43Z","updated_at":"2017-05-10T11:55:30Z","closed_at":"2016-09-12T05:00:28Z","body":"I keep getting the following error when trying to run DynamoDB locally. Looks like the tests Dynamoose run just fine and run DynamoDB locally as well. So I'm not sure why it would be giving me this error here. Any ideas?\n\n```\ndynamoose:table error describing table +26s { NetworkingError: Protocol \"http:\" not supported. Expected \"https:\"\n  at new ClientRequest (_http_client.js:55:11)\n  at Object.exports.request (http.js:31:10)\n  at handleRequest (/Code/node_modules/aws-sdk/lib/http/node.js:43:23)\n  at executeSend (/Code/node_modules/aws-sdk/lib/event_listeners.js:241:29)\n  at Request.SEND (/Code/node_modules/aws-sdk/lib/event_listeners.js:256:9)\n  at Request.callListeners (/Code/node_modules/aws-sdk/lib/sequential_executor.js:101:18)\n  at Request.emit (/Code/node_modules/aws-sdk/lib/sequential_executor.js:77:10)\n  at Request.emit (/Code/node_modules/aws-sdk/lib/request.js:661:14)\n  at Request.transition (/Code/node_modules/aws-sdk/lib/request.js:22:10)\n  at AcceptorStateMachine.runTo (/Code/node_modules/aws-sdk/lib/state_machine.js:14:12)\n  at /Code/node_modules/aws-sdk/lib/state_machine.js:26:10\n  at Request.<anonymous> (/Code/node_modules/aws-sdk/lib/request.js:38:9)\n  at Request.<anonymous> (/Code/node_modules/aws-sdk/lib/request.js:663:12)\n  at Request.callListeners (/Code/node_modules/aws-sdk/lib/sequential_executor.js:115:18)\n  at callNextListener (/Code/node_modules/aws-sdk/lib/sequential_executor.js:95:12)\n  at /Code/node_modules/aws-sdk/lib/event_listeners.js:167:9\nmessage: 'Protocol \"http:\" not supported. Expected \"https:\"',\ncode: 'NetworkingError',\nregion: 'us-west-2',\nhostname: 'localhost',\nretryable: true,\ntime: 2016-09-12T04:47:32.910Z }\n```\n"},"comment":{"url":"https://api.github.com/repos/automategreen/dynamoose/issues/comments/300459500","html_url":"https://github.com/automategreen/dynamoose/issues/64#issuecomment-300459500","issue_url":"https://api.github.com/repos/automategreen/dynamoose/issues/64","id":300459500,"user":{"login":"henhal","id":9608258,"avatar_url":"https://avatars0.githubusercontent.com/u/9608258?v=3","gravatar_id":"","url":"https://api.github.com/users/henhal","html_url":"https://github.com/henhal","followers_url":"https://api.github.com/users/henhal/followers","following_url":"https://api.github.com/users/henhal/following{/other_user}","gists_url":"https://api.github.com/users/henhal/gists{/gist_id}","starred_url":"https://api.github.com/users/henhal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henhal/subscriptions","organizations_url":"https://api.github.com/users/henhal/orgs","repos_url":"https://api.github.com/users/henhal/repos","events_url":"https://api.github.com/users/henhal/events{/privacy}","received_events_url":"https://api.github.com/users/henhal/received_events","type":"User","site_admin":false},"created_at":"2017-05-10T11:55:30Z","updated_at":"2017-05-10T11:55:30Z","body":"I got the very same issue and it turns out it was my `httpOptions` used to resolve https://github.com/aws/aws-sdk-js/issues/862 that caused the problems. These options set up an HTTPS agent with TLSv1, and as a side-effect apparently disables HTTP.\r\n\r\nDetails:\r\n\r\nThis does NOT work (gives the \"http not supported\" message):\r\n\r\n```\r\nnew AWS.DynamoDB({\r\n  endpoint: new AWS.Endpoint('http://localhost:8000'),\r\n  httpOptions: {\r\n    agent: new https.Agent({\r\n      secureProtocol: \"TLSv1_method\",\r\n      ciphers: \"ALL\"\r\n    })\r\n  }\r\n});\r\n```\r\n\r\nbut this works:\r\n\r\n```\r\nnew AWS.DynamoDB({\r\n  endpoint: new AWS.Endpoint('http://localhost:8000')\r\n});\r\n```\r\n\r\nThe sneaky thing was I had the `httpOptions` injected as default options in one central place to eliminate the 862 issue and didn't immediately realize what was happening - when setting up a DynamoDB object from a stand-alone node console everything was working fine! :)"}}
{"actor":{"display_login":"henhal"}}