Fork me on GitHub

yeah it is a real head scratcher


Try switching server type to :cloud


You are missing proxy port


:proxy-port <local-port for SSH tunnel to bastion>


Add the proxy port entry


I couldn't ever figure out which port number to use so I just left it off and let it use the default port


Doesnt work that way ;)


If you used the one in the docs its 8182


If you didnt overload on the socks proxy script


But you do need to supply it in the cfg map @gdeer81


okay, I set it to 8182 in the config map and it threw an error in my repl and the terminal where the proxy script was running terminated, so I restarted the proxy script and reran

(def client (d/client cfg))
and didn't get any errors, so it's working I guess? :man-shrugging::skin-tone-2:


oh boy, now I can get to the fun part


I spoke too soon >_<

user=> (d/create-database client {:db-name "movies"})
ExceptionInfo java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter  clojure.core/ex-info (core.clj:4739)


probably just a java 9+ problem, I've seen something like this at work before


in case anyone stumbles upon this conversation in the future: I had to update my deps.edn to add the module with an alias I named "my-ops"

  {com.datomic/client-cloud {:mvn/version "0.8.54"}}
 {:my-ops {:jvm-opts ["--add-modules" "java.xml.bind"]}}}
Then I started up clojure with the command line flag -O to use it
clj -O:my-ops
and now I am able to do the thing I was trying to do for like two days now
user=> (d/create-database client {:db-name "movies"})


Thanks @marshall for your assistance with that config mess. I'll to try to find where I read that the proxy-port key defaults to something if not provided. not sure if I ran into bad docs or if grossly misread something 🙃


Np. Glad to help


is it a bad idea to serve your app’s root html from an ion? i’m guessing the warmup time makes that impractical…


@sekao it depend on usage patterns. Is your app in continuous use, and how many 9s of low latency response do you need?


@sekao and if you are playing the long game, don't sweat the specifics of the current integration too much, we can offer other integrations besides the Lambda proxy in the future


I’m going to repeat a question from yesterday because I think it got lost in the surrounding discussion, but if it doesn’t get any bites this time I won’t bother the channel again. 😇


question about Ions: if I run say items-by-type out of ion-starter at the REPL I get a nice pretty string with an array of arrays in it, suitable for such activities as deserializing into JSON when I invoke that ion as a Lambda, however, I get a nice pretty string that is the first string wrapped in a hashset (e.g., "#{[[...stuff...]]}") (edited) This presents a problem if I want to then deserialize the result of a Lambda execution somewhere. Is that extra #{...} wrapper Lambda the Ultimate’s doing? Is there a way to “turn it off”? (apologies if this is answered in the video above, which I haven’t gotten a chance to watch. Stupid linear time!)


The use case here is that I have an example almost completely done showing how to set up AppSync and Cognito to work with Ions and I want to show the difference between doing the transformation of data shape between GraphQL and Lambda in a net-new ion vs. in the AppSync resolver VTL template (tl; dr: do you want to use Velocity when you have Clojure ready to hand, for data transform? You do not!)


but the AppSync invocation of the items-by-type Lambda chokes on the #{ ... }


@chris_johnson The answer is not immediately obvious to me, but the problem is almost certainly not in the Lambda. Why can't AppSync handle the set notation?


because it’s not JSON


items-by-type does not return JSON


if you want it to do so, modify it to print JSON instead of printing edn


and then I hope you will be good to go! Are you going to publish the example?


Okay, that makes sense. I was hoping to be able to take just the raw edn string value and process it in VTL on the AppSync side, not because it’s a thing you’d want to do often but to demonstrate dropping AppSync “onto” an existing ion, but AppSync tries to deserialize it before handing it off


yeah, that gives me the information I need. I do already have an items-by-type-gql which returns JSON but it’s also doing the output data shaping.


any name with more than two hyphens is doing too much 🙂




I do intend to publish this example just as soon as I get these last couple bits polished up and finish finding or creating enough cool memes to put in the README


I will also go look again and see if there’s a way to make the AppSync resolver expect a raw string instead of something it can parse into JSON, which would be delightful.


once you are out in the broader AWS world you should probably be in JSON anyway 😞


I mean, they expose VTL for you to template the output! Why would they give you a possibly-Turing-complete tool for shaping the output data but insist on pushing it through JSON.readString first? :thinking_face:


(Cross post from #clojure) I have what I think is a backup of a datomic database. It is a directory with the contents ./data/db/datomic.h2.db. Does this seem right? How do I translate that to a file:///home/... url? I am getting a clojure.lang.ExceptionInfo: :restore/no-roots No restore points available at error.


That's not a backup of a datomic db


Oh, ok. I'll have to dig up the old computer I had the backups running on. Thanks!


that's a dev h2 database


i.e. what the datomic dev transactor uses to store its blobs


Can I (or have plans) to generate a "amazon event that triggers a lambda" on every transaction on datomicIons?


[(identity ?list) [[?e ?a "" _ true] ...]] seems to match any value. You can't use literals in this way, can you?


My ion with API Gateway integration is responding with the body base64 encoded...what might I be doing incorrectly? :thinking_face:


@cjsauer in the API Gateway test UI, or as viewed from e.g. curl?


@stuarthalloway it's within the API Gateway UI, but I'm also seeing it happen within the Lambda console using a sample API Gateway event. My handler is returning a string in the response :body field.


@cjsauer that is by design. You must make a gateway level choice about how to do this, and then Gateway will fix it on the way through


the only way to see it the way you want is to consume all the way from the outside edge, e.g. from your browser or curl


@stuarthalloway hm...even hitting it with curl returns a base64 encoded string. I'm testing at the REPL as well by doing (my-handler {:input (slurp "fixture.json")}) and am also seeing the encoding.


maybe you left out "Choose Add Binary Media Type, and add the */* type, then Save Changes." from


I left that out about 100 times when testing it ^^


@stuarthalloway DOH...that was it!! Working now. Thank you! 🍻


I don't have any experience running applications that require HIPPA compliance. I'm curious if anyone has ran Datomic in such an environment and if it would be possible to store HIPPA protected data in Datomic Cloud.


has anyone successfully used figwheel main along with datomic cloud client? It seems there are some dependency issues on the version of jetty that each one requires. if I try to use the version of jetty that datomic cloud api requires (9.3.7.v2016011) then figwheel can't connect...looks like it gets an error trying to create the websocket. If I use the version figwheel main relies on which looks to be (9.2.21.v20170120) then of course datomic cloud api gets errors trying to connect.


jetty seems to be the one library that is constantly frustrating when it comes to dependency management in clojure


i'm looking at that now


well but i'm in dev mode working on my app that utilizes the datomic client api....that's the issue. Figured it out with Bruce's help in the figwheel-main channel. If anyone else comes across the issue you just need to exclude the websocket libs from figwheel main then add the version matching the jetty client (9.3) in your top level deps.