Liking cljdoc? Tell your friends :D


A Clojure client for Amazon's route53 DNS service.


[clj-r53 "1.0.2"]

Account Ids

Almost all fns take an argument called account-id. This is a map containing :user and :password. These are your AWS account id and secret. This is the same as your S3 credentials. To find it, go to, click on Account, click on Security Credentials. :user is the value in "Access Key ID" and :password is the value in "Secret Access Key".


It's expected you've read the r53 documentation and are familiar with its concepts.

Create a hosted DNS with

(clj-r53.client/create-hosted-zone-request ...)

Get the zone-id with



To make changes (add/delete records), use a with-r53-transaction block. It looks like

(clj-r53.client/with-r53-transaction account-ids zone-id
   (client/create-A-name :name "" :value "" :ttl 300)
   (client/create-CNAME :name "" :value "" :ttl 300))
  (let [account {:user (System/getenv "AWS_KEY")
                 :password (System/getenv "AWS_SECRET")}
        zone-id (get (clj-r53.client/list-hosted-zones account) "")]
    (with-r53-transaction account zone-id
      (create-A-name :name "" :value "" :ttl (str 600) :comment "comment")
      (create-A-name :name "" :value ["" ""] :ttl (str 600) :comment "comment")
      (create-CNAME  :name "" :value "" :ttl (str 600) :comment "comment")
      (create-TXT    :name "" :value "\"k=rsa; t=s; p=12345ABCDEF\"" :ttl (str 600) :comment "comment")
      (create-MX     :name "" :value ["10" "20"] :ttl (str 600) :comment "comment")
      (create-AAAA   :name "" :value ["10" "20"] :ttl (str 600) :comment "comment")
      (create-AAAA   :name "" :value ["2001:1234:abcd::1"] :ttl (str 600) :comment "comment")))

(let [account {:user (System/getenv "AWS_KEY")
               :password (System/getenv "AWS_SECRET")}
      zone-id (get (clj-r53.client/list-hosted-zones account) "")]
  (update-record account zone-id {:name ""} {:value ""  :comment "my new comment"}))

Any number of actions can be included, subject to r53 limitations.

Viewing records



EPL, same as Clojure

Can you improve this documentation? These fine people already did:
Allen Rohner & Arthur Ulfeldt
Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close