From 21ed5eb278c5f977752cadd75c5b87cf4d22286a Mon Sep 17 00:00:00 2001 From: Kei Tsuji Date: Thu, 17 Oct 2013 13:16:35 +0900 Subject: [PATCH] Adding support for calling AmazonSQSClient. without id/password to support authentication via IAM role. From EC2 instance with IAM Role, we can now create client like this (create-client). --- src/main/clojure/cemerick/bandalore.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/clojure/cemerick/bandalore.clj b/src/main/clojure/cemerick/bandalore.clj index a58940c..23272db 100644 --- a/src/main/clojure/cemerick/bandalore.clj +++ b/src/main/clojure/cemerick/bandalore.clj @@ -19,6 +19,11 @@ (defn create-client "Creates a synchronous AmazonSQSClient using the provided account id, secret key, and optional com.amazonaws.ClientConfiguration." + ([] + (create-client (com.amazonaws.ClientConfiguration.))) + ([client-config] + (AmazonSQSClient. + (.withUserAgent client-config "Bandalore - SQS for Clojure"))) ([id secret-key] (create-client id secret-key (com.amazonaws.ClientConfiguration.))) ([id secret-key client-config] @@ -200,4 +205,4 @@ ;; void removePermission(RemovePermissionRequest removePermissionRequest) ; The RemovePermission action revokes any permissions in the queue policy that matches the specified Label parameter. ;; void addPermission(AddPermissionRequest addPermissionRequest) - ;;The AddPermission action adds a permission to a queue for a specific principal. \ No newline at end of file + ;;The AddPermission action adds a permission to a queue for a specific principal.