          (.setAttributeType (utils/enum key-type))))
      defs)))
 
-(defn- local-indexes
+(defn- local-2nd-indexes
   "[{:name _ :range-keydef _ :projection _} ...] indexes -> [LocalSecondaryIndex ...]"
   [hash-keydef indexes]
-  (if indexes
+  (when indexes
     (mapv
       (fn [{index-name :name
-            :keys      [range-keydef projection]
-            :or        {projection :all}
-            :as        index}]
+           :keys      [range-keydef projection]
+           :or        {projection :all}
+           :as        index}]
         (assert (and index-name range-keydef projection)
-                (str "Malformed index: " index))
+                (str "Malformed local secondary index (LSI): " index))
         (doto (LocalSecondaryIndex.)
           (.setIndexName (name index-name))
           (.setKeySchema (key-schema hash-keydef range-keydef))

                     stitching.
    :return        - e/o #{:all-attributes :all-projected-attributes :count
                           [<attr> ...]}.
    :index         - Name of a secondary index to query.
    :order         - Index scaning order e/o #{:asc :desc}.
    :limit         - Max num >=1 of items to eval (≠ num of matching items).
                     Useful to prevent harmful sudden bursts of read activity.

    (.setWriteCapacityUnits (long write-units))))

(defn- keydefs "[<name> <type>] defs -> [AttributeDefinition ...]"
  [hash-keydef range-keydef lsindexes gsindexes]
  (let [defs (->> (conj [] hash-keydef range-keydef)
                  (concat (mapv :range-keydef lsindexes))
                  (concat (mapv :hash-keydef  gsindexes))
                  (concat (mapv :range-keydef gsindexes))
                  (filterv identity))]
    (mapv
     (fn [[key-name key-type :as def]]
