 
 (defmethod create-aws-client :sqs
   [^Keyword type]
-  (let [endpoint (sqs-endpoint)]
-    (if (nil? endpoint)
-      (new AmazonSQSClient)
-      (configure-aws-client
-        (new AmazonSQSClient (new BasicAWSCredentials "unused" "unused"))
-        :setEndpoint [endpoint]))))
+  (configure-aws-client
+    (new AmazonSQSClient)
+    :setEndpoint (sqs-endpoint)))
 
 (defmethod create-aws-client :sns
   [^Keyword type]
-  (let [endpoint (sns-endpoint)]
-    (if (nil? endpoint)
-      (new AmazonSNSClient)
-      (configure-aws-client
-        (new AmazonSNSClient (new BasicAWSCredentials "unused" "unused"))
-        :setEndpoint [endpoint]))))
+  (configure-aws-client
+    (new AmazonSNSClient)
+    :setEndpoint (sns-endpoint)))
 
 (defrecord SQSQueueBroker
   ;; A record containing fields related to accessing SNS/SQS exchanges and queues.

  method with the given args."
  [client-obj method args]
  (when-not (nil? (first args))
    (info "\tConfig:" method "=" args)
    (Reflector/invokeInstanceMethod
     client-obj (name method) (object-array args))))


  it is best to define the default configuration value as nil, so as to avoid
  unexpected client behaviour."
  [client-obj & args]
  (debug "Configuring client" client-obj)
  (doseq [[config-key config-val] (partition 2 args)]
    (set-aws-client-attr! client-obj config-key [config-val]))
  client-obj)

(defmulti create-aws-client
