aws

http://status.aws.amazon.com/ https://www.expeditedssl.com/aws-in-plain-english
kenny 2020-02-25T16:11:49.011800Z

Oh wow. Just noticed a bunch of functions in cognitect.aws.credentials have been pulled out into nice helpers. This cleans up a ton of code. Thank you!

2020-02-25T16:17:30.012500Z

Just be sure to rely only on the documented functions 🙂

2020-02-25T16:18:27.013Z

Functions with "For internal use. Do not call directly." may change without warning.

1
2020-02-25T16:55:08.013500Z

the aws libraries don't seem to be on Clojars, is that correct?

2020-02-25T16:55:34.014100Z

Correct.

2020-02-25T16:55:43.014400Z

Just maven

2020-02-25T16:55:58.014800Z

yeah ok cool, why if I may ask?

2020-02-25T16:56:03.015100Z

easier to have just in one place?

2020-02-25T16:56:29.015900Z

Honestly, it was a decision made over a year ago. Don't remember why.

2020-02-25T16:57:03.016800Z

yeah sure, the clojars badge saves some work imho for the readme

ghadi 2020-02-25T16:57:56.017400Z

@andrea.crotti what badge?

2020-02-25T17:00:52.018600Z

this one for example

2020-02-25T17:01:12.019300Z

you see it lots of libraries, just keeps track of the latest version automatically

ghadi 2020-02-25T17:02:04.020400Z

aws-api uses at least three artifacts to do anything useful

ghadi 2020-02-25T17:02:21.020800Z

the client, the endpoints, and N>=1 services that you're using

2020-02-25T17:04:37.021200Z

kaocha does something similar, and with a nice table https://github.com/lambdaisland/kaocha

2020-02-25T17:09:04.022400Z

There are badges for maven too, https://github.com/softwaremill/maven-badges

2020-02-25T17:09:38.023600Z

The problem with them, however, is that you can't copy and paste from them into your deps.edn 😉

ghadi 2020-02-25T17:09:52.024200Z

i don't find this very useful unless it's copypastable, and I'd prefer it to be in deps.edn format

2020-02-25T17:09:52.024300Z

What we have on aws-api is less pretty, but more useful IMO.

➕ 1
ghadi 2020-02-25T17:09:54.024500Z

jinx

2020-02-25T17:10:35.024900Z

What @ghadi said (after I said it) 😉

2020-02-25T17:12:53.025900Z

👍

2020-02-25T17:14:37.026400Z

I'm struggling again with the same error

{:cognitect.anomalies/category :cognitect.anomalies/fault,
 :cognitect.aws.client/throwable #error {
 :cause "Property null is not supported"
 :via

2020-02-25T17:14:54.027Z

but this time when I try to do a ListObjects operation like

(aws/invoke (s3-client) {:op :ListObjectsV2
                           :request {:Bucket "bucket"}})

2020-02-25T17:15:14.027800Z

the returned XML seem to be something like

<?xml version="1.0" encoding="UTF-8"?>
&lt;ListBucketResult xmlns="<http://s3.amazonaws.com/doc/2006-03-01/>"&gt;&lt;Name&gt;bucket&lt;/Name&gt;&lt;Prefix&gt;&lt;/Prefix&gt;&lt;KeyCount&gt;0&lt;/KeyCount&gt;&lt;MaxKeys&gt;10000&lt;/MaxKeys&gt;&lt;Delimiter&gt;&lt;/Delimiter&gt;&lt;IsTruncated&gt;false&lt;/IsTruncated&gt;&lt;/ListBucketResult&gt;

2020-02-25T17:15:47.028300Z

with the same client/config putting and fetching an object works fine

ghadi 2020-02-25T17:15:56.028700Z

do you have the full :via stacktrace?

2020-02-25T17:16:29.029100Z

[{:type java.lang.IllegalArgumentException
   :message "Property null is not supported"
   :at [com.sun.xml.internal.stream.XMLInputFactoryImpl setProperty "XMLInputFactoryImpl.java" 246]}]
 :trace
 [[com.sun.xml.internal.stream.XMLInputFactoryImpl setProperty "XMLInputFactoryImpl.java" 246]
  [clojure.data.xml$new_xml_input_factory invokeStatic "xml.clj" 323]
  [clojure.data.xml$new_xml_input_factory invoke "xml.clj" 319]
  [clojure.data.xml$source_seq invokeStatic "xml.clj" 332]
  [clojure.data.xml$source_seq doInvoke "xml.clj" 326]
  [clojure.lang.RestFn applyTo "RestFn.java" 139]
  [clojure.core$apply invokeStatic "core.clj" 667]
  [clojure.core$apply invoke "core.clj" 660]
  [clojure.data.xml$parse invokeStatic "xml.clj" 346]
  [clojure.data.xml$parse doInvoke "xml.clj" 340]
  [clojure.lang.RestFn invoke "RestFn.java" 486]
  [cognitect.aws.util$xml_read invokeStatic "util.clj" 137]
  [cognitect.aws.util$xml_read invoke "util.clj" 134]
  [cognitect.aws.shape$xml_parse invokeStatic "shape.clj" 217]
  [cognitect.aws.shape$xml_parse invoke "shape.clj" 214]
  [cognitect.aws.protocols.rest$parse_body invokeStatic "rest.clj" 247]
  [cognitect.aws.protocols.rest$parse_body invoke "rest.clj" 235]
  [cognitect.aws.protocols.rest$parse_http_response invokeStatic "rest.clj" 260]
  [cognitect.aws.protocols.rest$parse_http_response invoke "rest.clj" 249]
  [cognitect.aws.protocols.rest_xml$eval17611$fn__17612 invoke "rest_xml.clj" 23]
  [clojure.lang.MultiFn invoke "MultiFn.java" 239]
  [cognitect.aws.client$handle_http_response invokeStatic "client.clj" 48]
  [cognitect.aws.client$handle_http_response invoke "client.clj" 42]
  [cognitect.aws.client$send_request_STAR_$fn__24125 invoke "client.clj" 82]
  [clojure.core.async.impl.channels.ManyToManyChannel$fn__4659$fn__4660 invoke "channels.clj" 95]
  [clojure.lang.AFn run "AFn.java" 22]
  [java.util.concurrent.ThreadPoolExecutor runWorker "ThreadPoolExecutor.java" 1128]
  [java.util.concurrent.ThreadPoolExecutor$Worker run "ThreadPoolExecutor.java" 628]
  [java.lang.Thread run "Thread.java" 835]]

2020-02-25T17:16:52.029600Z

same thing as what I had a few days ago, the error just says it can't parse the XML

ghadi 2020-02-25T17:18:20.030400Z

can you file an issue with this info and we can take a look at it?

ghadi 2020-02-25T17:18:36.030600Z

this stacktrace helps

ghadi 2020-02-25T17:20:22.031200Z

also @andrea.crotti need the computed deps versions from your project (specifically for clojure.data.xml)

2020-02-25T17:21:14.031600Z

looks like it [org.clojure/data.xml "0.0.8"]

2020-02-25T17:21:38.032300Z

which should be the latest

ghadi 2020-02-25T17:21:52.033200Z

0.0.8 doesn't seem right

2020-02-25T17:22:11.033500Z

latest stable at least

2020-02-25T17:22:19.033900Z

from https://github.com/clojure/data.xml, but I can try to change it

ghadi 2020-02-25T17:23:40.034700Z

I wonder how your deps are getting overridden to the wrong version

2020-02-25T17:23:57.035Z

That's definitely most likely the issue.

2020-02-25T17:25:41.035900Z

And even though the data.xml version is alpha6, it's been that way since Nov 2018. That's one definition of stable 😉

2020-02-25T17:26:45.036300Z

@andrea.crotti are you using tools.deps, leiningen, other?

2020-02-25T17:27:52.036800Z

ah well sadly upgrading data.xml makes something else blow up

2020-02-25T17:27:55.037100Z

so I can't try it directly

2020-02-25T17:28:03.037600Z

but I'll keep digging

2020-02-25T17:28:09.038200Z

thanks in the meanwhile

ghadi 2020-02-25T17:28:16.038500Z

you should inspect your lein deps :tree for conflicts

2020-02-25T17:39:10.039Z

no it's just some code we have in a utils.clj file