{"action":"opened","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/1601","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/1601/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/1601/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/1601/events","html_url":"https://github.com/aws/aws-cli/issues/1601","id":113859604,"number":1601,"title":"aws cli dynamodb query documentation needs clarifying and examples","user":{"login":"keithdotpower","id":5015574,"avatar_url":"https://avatars.githubusercontent.com/u/5015574?v=3","gravatar_id":"","url":"https://api.github.com/users/keithdotpower","html_url":"https://github.com/keithdotpower","followers_url":"https://api.github.com/users/keithdotpower/followers","following_url":"https://api.github.com/users/keithdotpower/following{/other_user}","gists_url":"https://api.github.com/users/keithdotpower/gists{/gist_id}","starred_url":"https://api.github.com/users/keithdotpower/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithdotpower/subscriptions","organizations_url":"https://api.github.com/users/keithdotpower/orgs","repos_url":"https://api.github.com/users/keithdotpower/repos","events_url":"https://api.github.com/users/keithdotpower/events{/privacy}","received_events_url":"https://api.github.com/users/keithdotpower/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-28T16:19:09Z","updated_at":"2015-10-28T16:19:09Z","closed_at":null,"body":"The current documentation for using dynamodb via cli (at http://docs.aws.amazon.com/cli/latest/reference/dynamodb/query.html) is not very helpful. I've got some queries going by trial and error but I just can't work out how to use --starting-token.\r\n\r\nWhat would be particularly helpful would be some examples. The single example there is very simple and uses a parameter which is documented as legacy (--key-conditions).\r\n\r\nThe particular problem I still can't solve after a day of hair-pulling is how to use the NextToken value returned from one query to pass into another. E.g. at the end of my results for one query I get:\r\n\r\n```\r\n    \"NextToken\": \"{u'license': {u'S': u'a5fef9b2-a8b7-4213-8d63-e9cb6f8ca7e7'}, u'ts': {u'S': u'1445257263181'}, u'key': {u'S': u'c7c420b2-c95b-42c0-92ba-15a9eaab3aa2'}}\",\r\n    \"ScannedCount\": 50,\r\n    \"ConsumedCapacity\": null\r\n}\r\n```\r\nHow do I pass that via --starting-token to my next query to get the rest of the results? If I try:\r\n\r\n```\r\n--starting-token '{\"license\": {\"S\": \"a5fef9b2-a8b7-4213-8d63-e9cb6f8ca7e7\"}, \"ts\": {\"S\": \"1445257263181\"}, \"key\": {\"S\": \"c7c420b2-c95b-42c0-92ba-15a9eaab3aa2\"}}'\r\n```\r\n\r\nI get: \r\n\r\n```\r\nParameter validation failed:\r\nInvalid type for parameter ExclusiveStartKey, value: {\"license\": {\"S\": \"a5fef9b2-a8b7-4213-8d63-e9cb6f8ca7e7\"}, \"ts\": {\"S\": \"1445257263181\"}, \"key\": {\"S\": \"c7c420b2-c95b-42c0-92ba-15a9eaab3aa2\"}}, type: <type 'unicode'>, valid types: <type 'dict'>\r\n```\r\n\r\nI'm giving up on this now and will try again with the Java API tomorrow, just adding this issue to help the next guy."}}