mcohen01 / amazonica

A comprehensive Clojure client for the entire Amazon AWS api.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sns message-attributes does not works.

umairaslamm opened this issue · comments

I am trying to set message attributes but looks like it does not works as shown in the example docs.

(publish :topic-arn "arn:aws:sns:us-east-1:676820690883:my-topic"
         :subject "test"
         :message (str "Todays is " (java.util.Date.))
         :message-attributes {"attr" "value"})

my code

(sns/publish
    {:access-key ((topic-config "user") "key") :secret-key ((topic-config "user") "secret") :region "us-east-1"}
    {:topic-arn (topic-config "id")
     :subject "Request with message attributes"
     :message "My Message"
     :message-attributes {:key1 val1 :key2 val2 :key3 val3}
     }
    )

fails to set any attribute to the message published to topic.

it correctly being set. There is some problem with aws ui that it does not show it in the attributes tab
however the body tab does shows it correctly

"MessageAttributes": {
    "attr": {
      "Type": "String",
      "Value": "value"
    }
  }