 (defn instance-info-map
   "Returns map of instance-id to map of information about instance."
   [is]
-  (let [res   (:reservations (describe-instances :instance-ids is))
+  (let [is    (vec is)
+        res   (:reservations (describe-instances :instance-ids is))
         ims   (map #(get-in % [:instances 0]) res)
         xms   (map (fn [im] (m-section im
                       [:instance-id

        (instance-info-map is)
        (let [[v c] (async/alts! [cl to])]
          (cond
           (= c to) (do (info "Timeout on instance request:" is)
                        (close-notify-chan! id)
                        (stop is)
                        nil)
           (= c cl) (recur (dec i))))))))


(def ag (ssh/ssh-agent {}))

(timbre/refer-timbre)


(defonce all-normal-instances (atom #{}))
(defonce all-requests (atom #{}))


(def cred (read-string (slurp "AWS.clj")))
(apply defcredential (map cred [:access-key :secret-key :endpoint]))

