{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/699","labels_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/699/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/699/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/699/events","html_url":"https://github.com/aws/aws-sdk-ruby/issues/699","id":57093311,"number":699,"title":"DynamoDB API broken with SDKv2?","user":{"login":"smeyfroi","id":203996,"avatar_url":"https://avatars.githubusercontent.com/u/203996?v=3","gravatar_id":"","url":"https://api.github.com/users/smeyfroi","html_url":"https://github.com/smeyfroi","followers_url":"https://api.github.com/users/smeyfroi/followers","following_url":"https://api.github.com/users/smeyfroi/following{/other_user}","gists_url":"https://api.github.com/users/smeyfroi/gists{/gist_id}","starred_url":"https://api.github.com/users/smeyfroi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smeyfroi/subscriptions","organizations_url":"https://api.github.com/users/smeyfroi/orgs","repos_url":"https://api.github.com/users/smeyfroi/repos","events_url":"https://api.github.com/users/smeyfroi/events{/privacy}","received_events_url":"https://api.github.com/users/smeyfroi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-09T21:34:46Z","updated_at":"2015-02-10T11:15:18Z","closed_at":null,"body":"I've ported some old code that has worked for ages using the v1 API, and still works with the latest dynamodb-local. Running it against the eu-west-1 endpoint gives this errors as below. The error message suggests that it wants a 'tableName' attribute, rather than 'table_name'. Even though dynamodb-local wants 'table_name', and the docs say 'table_name'. In fact using 'tableName' has no effect, see below.\r\n\r\nI believe I see something similar with the put_items API. In this case the error complains about the requestItems attribute.\r\n\r\nWhat funkiness is going on here?\r\n\r\nI feel bad raising this, because it seems like the problem should be in my code. But as I say, I've had this stuff running for over a year on the old SDK against eu-west-1, and everything also works on the latest dynamodb-local as expected. For example this is a successful ```local``` query matching the bad ones below:\r\n```\r\nGood local query:\r\n\r\n[Aws::DynamoDB::Client 200 0.004374 0 retries] query(table_name:\"cc_metrics\",select:\"ALL_ATTRIBUTES\",scan_index_forward:false,consistent_read:false,key_conditions:{\"resource_id_interval\"=>{attribute_value_list:[{s:\"445:3600\"}],comparison_operator:\"EQ\"},\"timestamp\"=>{attribute_value_list:[{n:\"1423337386001\"},{n:\"1423430986001\"}],comparison_operator:\"BETWEEN\"}})\r\n```\r\n\r\n```\r\nBad eu-west-1 query:\r\n\r\n{:table_name=>\"test_cc_group_metrics\", :select=>\"ALL_ATTRIBUTES\", :scan_index_forward=>false, :consistent_read=>false, :limit=>1}\r\nopening connection to dynamodb.eu-west-1.amazonaws.com:443...\r\nopened\r\nstarting SSL for dynamodb.eu-west-1.amazonaws.com:443...\r\nSSL established\r\n<- \"POST / HTTP/1.1\\r\\nContent-Type: application/x-amz-json-1.0\\r\\nAccept-Encoding: \\r\\nUser-Agent: aws-sdk-ruby2/2.0.22 ruby/2.1.5 x86_64-linux\\r\\nX-Amz-Target: DynamoDB_20120810.Query\\r\\nX-Amz-Date: 20150209T211716Z\\r\\nHost: dynamodb.eu-west-1.amazonaws.com\\r\\nX-Amz-Content-Sha256: e20a7898edbb9f6b80d5d26548e4d3e8919b44e004a3f27ecd6f698fe9251407\\r\\nAuthorization: AWS4-HMAC-SHA256 Credential=REDACTED/20150209/eu-west-1/dynamodb/aws4_request, SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=fcd203a4ee1b45499673ee74da8f1f2ac98918c04fc9e9363add9fb6ec53c02c\\r\\nContent-Length: 233\\r\\nAccept: */*\\r\\n\\r\\n\"\r\n-> \"HTTP/1.1 400 Bad Request\\r\\n\"\r\n-> \"x-amzn-RequestId: UDVLG8SU93I7RDQDSDAESBPIE3VV4KQNSO5AEMVJF66Q9ASUAAJG\\r\\n\"\r\n-> \"x-amz-crc32: 2331945813\\r\\n\"\r\n-> \"Content-Type: application/x-amz-json-1.0\\r\\n\"\r\n-> \"Content-Length: 179\\r\\n\"\r\n-> \"Date: Mon, 09 Feb 2015 21:16:16 GMT\\r\\n\"\r\n-> \"\\r\\n\"\r\nreading 179 bytes...\r\n-> \"{\\\"__type\\\":\\\"com.amazon.coral.validate#ValidationException\\\",\\\"message\\\":\\\"1 validation error detected: Value null at 'tableName' failed to satisfy constraint: Member must not be null\\\"}\"\r\nread 179 bytes\r\nConn keep-alive\r\n[Aws::DynamoDB::Client 400 0.036745 0 retries] query(table_name:\"test_cc_group_metrics\",select:\"ALL_ATTRIBUTES\",scan_index_forward:false,consistent_read:false,limit:1,key_conditions:{\"group_id_interval\"=>{attribute_value_list:[{s:\"16:900\"}],comparison_operator:\"EQ\"}}) Aws::DynamoDB::Errors::ValidationException 1 validation error detected: Value null at 'tableName' failed to satisfy constraint: Member must not be null\r\n```\r\n\r\nIncidentally, changing the request param to ```tableName``` gives the same result:\r\n```\r\nBad eu-west-1 query:\r\n\r\nopening connection to dynamodb.eu-west-1.amazonaws.com:443...\r\nopened\r\nstarting SSL for dynamodb.eu-west-1.amazonaws.com:443...\r\nSSL established\r\n<- \"POST / HTTP/1.1\\r\\nContent-Type: application/x-amz-json-1.0\\r\\nAccept-Encoding: \\r\\nUser-Agent: aws-sdk-ruby2/2.0.22 ruby/2.1.5 x86_64-linux\\r\\nX-Amz-Target: DynamoDB_20120810.Query\\r\\nX-Amz-Date: 20150209T212321Z\\r\\nHost: dynamodb.eu-west-1.amazonaws.com\\r\\nX-Amz-Content-Sha256: 9e54d9190f7eb1baceb7d4bdee43c2bc70802fc341578f08c40ad984a620be5e\\r\\nAuthorization: AWS4-HMAC-SHA256 Credential=REDACTED/20150209/eu-west-1/dynamodb/aws4_request, SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=da422e76789cfe325212eccba156b1ed2f4e1287a40ae8ee064fc9f0c7edd01a\\r\\nContent-Length: 232\\r\\nAccept: */*\\r\\n\\r\\n\"\r\n-> \"HTTP/1.1 400 Bad Request\\r\\n\"\r\n-> \"x-amzn-RequestId: 1J1EMRDTJTHDKDHKU63U7H5KARVV4KQNSO5AEMVJF66Q9ASUAAJG\\r\\n\"\r\n-> \"x-amz-crc32: 2331945813\\r\\n\"\r\n-> \"Content-Type: application/x-amz-json-1.0\\r\\n\"\r\n-> \"Content-Length: 179\\r\\n\"\r\n-> \"Date: Mon, 09 Feb 2015 21:22:20 GMT\\r\\n\"\r\n-> \"\\r\\n\"\r\nreading 179 bytes...\r\n-> \"{\\\"__type\\\":\\\"com.amazon.coral.validate#ValidationException\\\",\\\"message\\\":\\\"1 validation error detected: Value null at 'tableName' failed to satisfy constraint: Member must not be null\\\"}\"\r\nread 179 bytes\r\nConn keep-alive\r\n[Aws::DynamoDB::Client 400 0.036559 0 retries] query(tableName:\"test_cc_group_metrics\",select:\"ALL_ATTRIBUTES\",scan_index_forward:false,consistent_read:false,limit:1,key_conditions:{\"group_id_interval\"=>{attribute_value_list:[{s:\"16:900\"}],comparison_operator:\"EQ\"}}) Aws::DynamoDB::Errors::ValidationException 1 validation error detected: Value null at 'tableName' failed to satisfy constraint: Member must not be null\r\n```"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/comments/73683202","html_url":"https://github.com/aws/aws-sdk-ruby/issues/699#issuecomment-73683202","issue_url":"https://api.github.com/repos/aws/aws-sdk-ruby/issues/699","id":73683202,"user":{"login":"smeyfroi","id":203996,"avatar_url":"https://avatars.githubusercontent.com/u/203996?v=3","gravatar_id":"","url":"https://api.github.com/users/smeyfroi","html_url":"https://github.com/smeyfroi","followers_url":"https://api.github.com/users/smeyfroi/followers","following_url":"https://api.github.com/users/smeyfroi/following{/other_user}","gists_url":"https://api.github.com/users/smeyfroi/gists{/gist_id}","starred_url":"https://api.github.com/users/smeyfroi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smeyfroi/subscriptions","organizations_url":"https://api.github.com/users/smeyfroi/orgs","repos_url":"https://api.github.com/users/smeyfroi/repos","events_url":"https://api.github.com/users/smeyfroi/events{/privacy}","received_events_url":"https://api.github.com/users/smeyfroi/received_events","type":"User","site_admin":false},"created_at":"2015-02-10T11:15:18Z","updated_at":"2015-02-10T11:15:18Z","body":"Got it. If I call the API as follows then the error goes away. Are the param names not being converted correctly?\r\n\r\n```\r\nirb(main):004:0> client.describe_table('TableName'=>'test_cc_events')\r\nopening connection to dynamodb.eu-west-1.amazonaws.com:443...\r\nopened\r\nstarting SSL for dynamodb.eu-west-1.amazonaws.com:443...\r\nSSL established\r\n<- \"POST / HTTP/1.1\\r\\nContent-Type: application/x-amz-json-1.0\\r\\nAccept-Encoding: \\r\\nUser-Agent: aws-sdk-ruby2/2.0.22 ruby/2.1.5 x86_64-linux\\r\\nX-Amz-Target: DynamoDB_20120810.DescribeTable\\r\\nX-Amz-Date: 20150210T111440Z\\r\\nHost: dynamodb.eu-west-1.amazonaws.com\\r\\nX-Amz-Content-Sha256: 174fd624232807655698d4c1b836fa07df4a1283e012bc3491b87f9672382831\\r\\nAuthorization: AWS4-HMAC-SHA256 Credential=REDACTED/20150210/eu-west-1/dynamodb/aws4_request, SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date;x-amz-target, Signature=796d4d5e44996ebd9b1fc571aa56ccc938a2f6856b0eb7ffcc0b3895f695bd9a\\r\\nContent-Length: 30\\r\\nAccept: */*\\r\\n\\r\\n\"\r\n-> \"HTTP/1.1 200 OK\\r\\n\"\r\n-> \"x-amzn-RequestId: 6R380JINGS5QBRF1C02KDPNAANVV4KQNSO5AEMVJF66Q9ASUAAJG\\r\\n\"\r\n-> \"x-amz-crc32: 3831511604\\r\\n\"\r\n-> \"Content-Type: application/x-amz-json-1.0\\r\\n\"\r\n-> \"Content-Length: 1040\\r\\n\"\r\n-> \"Date: Tue, 10 Feb 2015 11:13:38 GMT\\r\\n\"\r\n-> \"\\r\\n\"\r\nreading 1040 bytes...\r\n-> \"{\\\"Table\\\":{\\\"AttributeDefinitions\\\":[{\\\"AttributeName\\\":\\\"organisation_id\\\",\\\"AttributeType\\\":\\\"N\\\"},{\\\"AttributeName\\\":\\\"resource_id_event\\\",\\\"AttributeType\\\":\\\"S\\\"},{\\\"AttributeName\\\":\\\"timestamp\\\",\\\"AttributeType\\\":\\\"N\\\"}],\\\"CreationDateTime\\\":1.421443377033E9,\\\"GlobalSecondaryIndexes\\\":[{\\\"IndexName\\\":\\\"gsi_orgid_timestamp\\\",\\\"IndexSizeBytes\\\":1055808,\\\"IndexStatus\\\":\\\"ACTIVE\\\",\\\"ItemCount\\\":10979,\\\"KeySchema\\\":[{\\\"AttributeName\\\":\\\"organisation_id\\\",\\\"KeyType\\\":\\\"HASH\\\"},{\\\"AttributeName\\\":\\\"timestamp\\\",\\\"KeyType\\\":\\\"RANGE\\\"}],\\\"Projection\\\":{\\\"NonKeyAttributes\\\":[\\\"_class\\\"],\\\"ProjectionType\\\":\\\"INCLUDE\\\"},\\\"ProvisionedThroughput\\\":{\\\"LastDecreaseDateTime\\\":1.422099472762E9,\\\"NumberOfDecreasesToday\\\":0,\\\"ReadCapacityUnits\\\":1,\\\"WriteCapacityUnits\\\":1}}],\\\"ItemCount\\\":10979,\\\"KeySchema\\\":[{\\\"AttributeName\\\":\\\"resource_id_event\\\",\\\"KeyType\\\":\\\"HASH\\\"},{\\\"AttributeName\\\":\\\"timestamp\\\",\\\"KeyType\\\":\\\"RANGE\\\"}],\\\"ProvisionedThroughput\\\":{\\\"LastDecreaseDateTime\\\":1.422099472713E9,\\\"NumberOfDecreasesToday\\\":0,\\\"ReadCapacityUnits\\\":1,\\\"WriteCapacityUnits\\\":1},\\\"TableName\\\":\\\"test_cc_events\\\",\\\"TableSizeBytes\\\":4262581,\\\"TableStatus\\\":\\\"ACTIVE\\\"}}\"\r\nread 1040 bytes\r\nConn keep-alive\r\n[Aws::DynamoDB::Client 200 0.025969 0 retries] describe_table(\"TableName\"=>\"test_cc_events\")\r\n\r\n=> {\"Table\"=>\r\n  {\"AttributeDefinitions\"=>\r\n    [{\"AttributeName\"=>\"organisation_id\", \"AttributeType\"=>\"N\"},\r\n```"}}