{"action":"opened","issue":{"url":"https://api.github.com/repos/boto/boto/issues/2902","labels_url":"https://api.github.com/repos/boto/boto/issues/2902/labels{/name}","comments_url":"https://api.github.com/repos/boto/boto/issues/2902/comments","events_url":"https://api.github.com/repos/boto/boto/issues/2902/events","html_url":"https://github.com/boto/boto/issues/2902","id":55019814,"number":2902,"title":"Set DynamoDB port in config file","user":{"login":"lari","id":789052,"avatar_url":"https://avatars.githubusercontent.com/u/789052?v=3","gravatar_id":"","url":"https://api.github.com/users/lari","html_url":"https://github.com/lari","followers_url":"https://api.github.com/users/lari/followers","following_url":"https://api.github.com/users/lari/following{/other_user}","gists_url":"https://api.github.com/users/lari/gists{/gist_id}","starred_url":"https://api.github.com/users/lari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lari/subscriptions","organizations_url":"https://api.github.com/users/lari/orgs","repos_url":"https://api.github.com/users/lari/repos","events_url":"https://api.github.com/users/lari/events{/privacy}","received_events_url":"https://api.github.com/users/lari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-21T13:43:43Z","updated_at":"2015-01-21T13:43:43Z","closed_at":null,"body":"Currently, the only way I've found to get [DynamoDB Local](http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html) working properly on my development environment (Vagrant) is by creating a custom `DynamoDBConnection`:\r\n\r\n``` python\r\n# Connect to DynamoDB Local\r\nconn = DynamoDBConnection(\r\n    host='localhost',\r\n    port=8000,\r\n    aws_access_key_id='anything',\r\n    aws_secret_access_key='anything',\r\n    is_secure=False)\r\n```\r\n\r\nHowever, this requires me to create unnecessary if clauses to the code that would not be needed in a production environment.\r\n\r\nAfter looking around a bit, I've managed to get the DynamoDB connect to localhost with the following config file:\r\n```\r\n[Boto]\r\nendpoints_path = /path/to/custom/boto_endpoints.json\r\nis_secure = False\r\n\r\n[Credentials]\r\naws_access_key_id = dummyid\r\naws_secret_access_key = dummyaccesskey\r\n\r\n[DynamoDB]\r\nregion = localhost\r\n```\r\n\r\nAnd the boto_endpoints.json file:\r\n``` json\r\n{\r\n    \"dynamodb\": {\r\n        \"localhost\": \"localhost\"\r\n    }\r\n}\r\n```\r\n\r\nThe only problem with this is that I cannot set a custom port, which defaults to 80 and is not very optimal to use with the DynamoDB Local.\r\n\r\nNow the only thing that would be needed is to add a way to configure the DynamoDB connection port through the config file or custom endpoints file and check this setting in the [`DynamoDBConnection.__init__()`.](https://github.com/boto/boto/blob/develop/boto/dynamodb2/layer1.py#L164)\r\n\r\nI could create a PR myself, but would like to hear if anyone has better suggestions."}}