 ;(application-list)
 ;(application "eu-west-1" "skeleton")
 ;(auto-scaling-group-exists? "eu-west-1" "skeleton")
-;(create-asgard-params (create-manual-deploy-params (merge (get (exploud.tyranitar/deployment-params "dev" "skeleton" "HEAD") "data") {"imageId" "woooooo" "selectedZones" ["eu-west-1a" "eu-west-1b"] "ticket" "something" "_action_save" ""}) "eu-west-1" "skeleton"))
+;(create-manual-deploy-params (merge (get (exploud.tyranitar/deployment-params "dev" "recommendations" "HEAD") "data") {}) "eu-west-1" "recommendations")
+;(create-asgard-params (create-manual-deploy-params (merge (get (exploud.tyranitar/deployment-params "dev" "recommendations" "HEAD") "data") {}) "eu-west-1" "recommendations"))
 ;(auto-scaling-save-url "eu-west-1")
 ;(set/rename-keys {"selectedLoadBalancers" ["beef" "steak"]} {"selectedLoadBalancers" "selectedLoadBalancersForVpcIdvpc-e23232"})
 ;(replace-security-group-names "eu-west-1" {"selectedSecurityGroups" ["woo" "sg-1234"]})

  returns a map containing the task information which can be used to
  retrieve the task and track the deployment."
  [region application-name params]
  (let [all-params (merge default-deploy-params (application-params application-name) params)]
    (log/info "Application" application-name "is being automatically deployed in" region "with params" all-params)
    (when-let [application (application region application-name)]
      (let [{:keys [headers status]} (http/simple-post (region-deploy-url region) {:form-params (create-asgard-params all-params) :follow-redirects false :socket-timeout 30000})]

      (:groupId found-group)
      (throw (Throwable. (str "Unknown security group with name " security-group))))))

(defn- replace-security-group-name [region security-group]
  (if (is-security-group-id? security-group)
    security-group
    (get-security-group-id security-group region)))

(defn- replace-security-group-names [region params]
  (if-let [security-group-names (get params "selectedSecurityGroups")]
    (let [security-group-ids (map (fn [sg] (replace-security-group-name region sg))
                                  security-group-names)]
      (assoc params "selectedSecurityGroups" security-group-ids))
    params))

(defn- amend-params [region params]
