I'm using this in our pallet deployer which derives the dns name via the public ip:
(defn get-aws-name []
(let [ip (-> (target-node) bean :publicAddresses first)]
(str "ec2-" (apply str (replace {\. \-} ip)) ".compute-1.amazonaws.com")))
private IPs also work via security groups:
(defn ips-in-group [group-name public-or-private]
"Sequence of the first public IP from each node in the group"
(->> (nodes-in-group group-name)
(map bean)
(map public-or-private)
(map first))
(defn public-ips-in-group
"Sequence of the first public IP from each node in the group"
[group-name]
(ips-in-group group-name :publicAddresses))
(defn private-ips-in-group
"Sequence of the first public IP from each node in the group"
[group-name]
(ips-in-group group-name :privateAddresses))