Paste #101604

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
create_table
------------
{
    "attribute_definitions": [
        {
            "attribute_name": "first_name",
            "attribute_type": "S"
        },
        {
            "attribute_name": "last_name",
            "attribute_type": "S"
        }
    ],
    "key_schema": [
        {
            "attribute_name": "first_name",
            "key_type": "HASH"
        }
    ],
    "local_secondary_indexes": [
        {
            "index_name": "bar",
            "key_schema": [
                {
                    "attribute_name": "first_name",
                    "key_type": "HASH"
                },
                {
                    "attribute_name": "last_name",
                    "key_type": "RANGE"
                }
            ],
            "projection": {
                "projection_type": "KEYS_ONLY"
            }
        }
    ],
    "table_name": "foo"
}

put_item
---------
{
    "item": {
        "first_name": {
            "S": "aj"
        },
        "last_name": {
            "S": "agr"
        }
    }
}

get_item
---------