{"action":"opened","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/869","labels_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/869/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/869/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/869/events","html_url":"https://github.com/aws/aws-sdk-ruby/issues/869","id":93757530,"number":869,"title":"DynamoDB raises exception on fetching records using index name","user":{"login":"BilalBudhani","id":1650995,"avatar_url":"https://avatars.githubusercontent.com/u/1650995?v=3","gravatar_id":"","url":"https://api.github.com/users/BilalBudhani","html_url":"https://github.com/BilalBudhani","followers_url":"https://api.github.com/users/BilalBudhani/followers","following_url":"https://api.github.com/users/BilalBudhani/following{/other_user}","gists_url":"https://api.github.com/users/BilalBudhani/gists{/gist_id}","starred_url":"https://api.github.com/users/BilalBudhani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BilalBudhani/subscriptions","organizations_url":"https://api.github.com/users/BilalBudhani/orgs","repos_url":"https://api.github.com/users/BilalBudhani/repos","events_url":"https://api.github.com/users/BilalBudhani/events{/privacy}","received_events_url":"https://api.github.com/users/BilalBudhani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-08T10:32:48Z","updated_at":"2015-07-08T10:32:48Z","closed_at":null,"body":"I've a table where I'm trying to fetch all the records which contains certain `userId`. It has a global index on that key. I'm using Dynamoid's adapter which gives me a client of aws-sdk 2. \r\n\r\n```ruby\r\nDynamoid::Adapter.adapter.client.query({\r\n        table_name: Auth.table_name,\r\n        limit: 500,\r\n        index_name: 'Auth_UserId_Uid_Index',\r\n        select: 'ALL_PROJECTED_ATTRIBUTES',\r\n        key_conditions: {'userId' => { attribute_value_list: [@user.id], comparison_operator: 'EQ'}}\r\n    })\r\n```\r\n\r\nAbove query works but for some users who has a lot more records it throws below exception:\r\n\r\n```\r\nAws::DynamoDB::Errors::ValidationException: 1 validation error detected: Value '[{uid=com.amazonaws.dynamodb.v20120810.AttributeValue@5d5d3b91}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@55af3c2e}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@845a33aa}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@dab65c7b}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@c285ec50}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@2ff2ef17}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@aea1e78c}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@230fce7e}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@a97227b1}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@f6c34fa}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@6b9a556d}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@224b23a2}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@2dbe982a}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@16c45bda}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@23856ca2}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@cd3af2d4}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@3c0557b0}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@ff4a8579}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@3f847a36}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@709778c}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@c9186f19}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@600f5493}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@8014715a}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@891b0ac0}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@2d28535f}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@a7a0acd7}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@ecf691e0}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@ef95c13a}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@b80c85c5}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@216b8a5c}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@4efed94c}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@ec32ca99}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@81b80135}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@c9a2bf76}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@81f41db5}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@e26425aa}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@81a27f25}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@5eeee0a}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@ac614604}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@6d8d7078}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@31134c6b}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@d49349b8}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@7622bff6}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@4ca9d4cc}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@bb8ecb14}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@f22881d7}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@7058de34}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@2a1fecde}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@be22bb76}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@157cdada}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@17b48ed8}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@55ec6876}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@36e74c0a}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@4ec167a3}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@267da274}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@19540156}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@90991dcf}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@51e434ee}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@720798b0}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@5e62ae6b}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@2b74a92e}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@1a0d839d}, {uid=com.amazonaws.dynamodb.v20120810.AttributeValue@8ab016d5}, {uid=com.amazonaws.dynamodb.v2\r\n```\r\n\r\nAny idea on this?\r\n\r\nStack info\r\nRuby: 2.2.2\r\nRails: 4.2.3"}}