According to dynamodb we are expecting that index name length should be in range 3-255 symbols. However in magnetodb rest api we cat create table with index name length less than 3 and more than 255 characters:
Index name 2 char:
2014-04-16 12:54:25,951 Request: POST http://127.0.0.1:8480/v1/default_tenant/data/tables
2014-04-16 12:54:25,951 Request Headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}
2014-04-16 12:54:25,951 Request Body: {"local_secondary_indexes": [{"key_schema": [{"key_type": "HASH", "attribute_name": "forum"}, {"key_type": "RANGE", "attribute_name": "last_posted_by"}], "index_name": "qq", "projection": {"projection_type": "ALL"}}], "key_schema": [{"key_type": "HASH", "attribute_name": "forum"}, {"key_type": "RANGE", "attribute_name": "subject"}], "table_name": "testtempest1865335512", "attribute_definitions": [{"attribute_type": "S", "attribute_name": "forum"}, {"attribute_type": "S", "attribute_name": "subject"}, {"attribute_type": "S", "attribute_name": "last_posted_by"}]}
2014-04-16 12:54:27,349 Response Status: 200
2014-04-16 12:54:27,349 Response Headers: {'date': 'Wed, 16 Apr 2014 12:54:27 GMT', 'content-length': '940', 'content-type': 'application/json'}
2014-04-16 12:54:27,349 Response Body: {"table_description": {"key_schema": [{"key_type": "HASH", "attribute_name": "forum"}, {"key_type": "RANGE", "attribute_name": "subject"}], "creation_date_time": 0, "links": [{"href": "http://127.0.0.1:8480/v1/default_tenant/data/tables/testtempest1865335512", "rel": "self"}, {"href": "http://127.0.0.1:8480/v1/default_tenant/data/tables/testtempest1865335512", "rel": "bookmark"}], "local_secondary_indexes": [{"index_size_bytes": 0, "key_schema": [{"key_type": "HASH", "attribute_name": "forum"}, {"key_type": "RANGE", "attribute_name": "last_posted_by"}], "index_name": "qq", "projection": {"projection_type": "ALL"}, "item_count": 0}], "table_name": "testtempest1865335512", "table_size_bytes": 0, "table_status": "ACTIVE", "attribute_definitions": [{"attribute_type": "S", "attribute_name": "last_posted_by"}, {"attribute_type": "S", "attribute_name": "forum"}, {"attribute_type": "S", "attribute_name": "subject"}], "item_count": 0}}
Index name 256 char:
2014-04-16 13:00:26,935 Request: POST http://127.0.0.1:8480/v1/default_tenant/data/tables
2014-04-16 13:00:26,936 Request Headers: {'Content-Type': 'application/json', 'Accept': 'application/json'}
2014-04-16 13:00:26,936 Request Body: {"local_secondary_indexes": [{"key_schema": [{"key_type": "HASH", "attribute_name": "forum"}, {"key_type": "RANGE", "attribute_name": "last_posted_by"}], "index_name": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", "projection": {"projection_type": "ALL"}}], "key_schema": [{"key_type": "HASH", "attribute_name": "forum"}, {"key_type": "RANGE", "attribute_name": "subject"}], "table_name": "testtempest1236299970", "attribute_definitions": [{"attribute_type": "S", "attribute_name": "forum"}, {"attribute_type": "S", "attribute_name": "subject"}, {"attribute_type": "S", "attribute_name": "last_posted_by"}]}
2014-04-16 13:00:28,169 Response Status: 200
2014-04-16 13:00:28,169 Response Headers: {'date': 'Wed, 16 Apr 2014 13:00:28 GMT', 'content-length': '1194', 'content-type': 'application/json'}
2014-04-16 13:00:28,169 Response Body: {"table_description": {"key_schema": [{"key_type": "HASH", "attribute_name": "forum"}, {"key_type": "RANGE", "attribute_name": "subject"}], "creation_date_time": 0, "links": [{"href": "http://127.0.0.1:8480/v1/default_tenant/data/tables/testtempest1236299970", "rel": "self"}, {"href": "http://127.0.0.1:8480/v1/default_tenant/data/tables/testtempest1236299970", "rel": "bookmark"}], "local_secondary_indexes": [{"index_size_bytes": 0, "key_schema": [{"key_type": "HASH", "attribute_name": "forum"}, {"key_type": "RANGE", "attribute_name": "last_posted_by"}], "index_name": "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", "projection": {"projection_type": "ALL"}, "item_count": 0}], "table_name": "testtempest1236299970", "table_size_bytes": 0, "table_status": "ACTIVE", "attribute_definitions": [{"attribute_type": "S", "attribute_name": "last_posted_by"}, {"attribute_type": "S", "attribute_name": "forum"}, {"attribute_type": "S", "attribute_name": "subject"}], "item_count": 0}}
Table name has the same limit of 3-255 chars. Please be sure to validate it as well.