        (handle-volumes spec endpoint instance-id)    
        (when-let [ip (get-in spec [:machine :ip])] 
          (debug (<<  "Associating existing ip ~{ip} to instance-id"))
-          (with-ctx eip/assoc-pub-ip instance-id ip))
+         (with-ctx (assoc-pub-ip endpoint instance-id ip)))
        (update-ip spec endpoint instance-id)
        (wait-for-ssh (pub-dns endpoint instance-id) user [5 :minute])
        (set-hostname spec endpoint instance-id user)

  (:require 
    [amazonica.aws.ec2 :as ec2]
    [aws.common :refer (with-ctx instance-desc creds image-id)]
    [aws.networking :refer (update-ip set-hostname pub-dns)]
    [aws.volumes :refer (delete-volumes handle-volumes)]
    [aws.sdk.eip :as eip]
    [aws.validations :refer (provider-validation)]
    [celestial.persistency :as p]
    [clojure.core.strint :refer (<<)] 

    (with-instance-id
      (debug "deleting" instance-id)
      (delete-volumes endpoint instance-id (spec :system-id)) 
      (with-ctx ec2/terminate-instances {:instance-ids [instance-id]}) 
      (wait-for-status this "terminated" [5 :minute])
      ; for reload support
      (s/update-system (spec :system-id) 
