     (wait-for-attach endpoint instance-id [10 :minute]))
   (let [zone (instance-desc endpoint instance-id :placement :availability-zone)]
     (doseq [{:keys [device size]} (aws :volumes)]
-      (let [{:keys [volumeId]} (with-ctx ebs/create-volume size zone)]
-        (wait-for {:timeout [10 :minute]} #(= "available" (with-ctx ebs/state volumeId))
+      (let [{:keys [volume-id]} (with-ctx ec2/create-volume {:size size :availability-zone zone})]
+        (wait-for {:timeout [10 :minute]} 
+           #(= "available" (volume-desc endpoint volume-id :state))
            {:type ::aws:ebs-volume-availability :message "Failed to wait for ebs volume to become available"})
-        (with-ctx ebs/attach-volume volumeId instance-id device)
-        (wait-for {:timeout [10 :minute]} #(= "attached" (with-ctx ebs/attachment-status volumeId))
+        (with-ctx ec2/attach-volume 
+          {:volume-id volume-id :instance-id instance-id :device device})
+        (wait-for {:timeout [10 :minute]} 
+           #(= "attached" (volume-desc endpoint volume-id :attachments 0 :state))
            {:type ::aws:ebs-volume-attach-failed :message "Failed to wait for ebs volume device attach"})))))
 
 (defn clear?

  (:require 
    [celestial.common :refer (import-logging )] 
    [celestial.provider :refer (wait-for)] 
    [aws.sdk.ebs :as ebs]
    [aws.sdk.ec2 :as ec2]
    [celestial.persistency.systems :as s]
    [aws.common :refer (with-ctx instance-desc creds image-id)]
    )) 

  (doseq [{:keys [ebs device-name]} (-> (instance-desc endpoint instance-id) :block-device-mappings rest)]
    (when (clear? device-name system-id)
      (trace "deleting volume" ebs) 
      (with-ctx ec2/detach-volume {:volume-id (ebs :volume-id)}) 
      (wait-for {:timeout [10 :minute]} 
        #(= "available" (with-ctx (volume-desc endpoint (ebs :volume-id) :state)))
        {:type ::aws:ebs-volume-availability 
         :message "Failed to wait for ebs volume to become available"}) 
      (with-ctx ec2/delete-volume {:volume-id (ebs :volume-id)}))))
