Fork me on GitHub

Hi 👋, question about IONS. I’m running an “older” version (668-8927) of solo topology. And I’m seeing api gateway integration error: “The response from the Lambda function doesn’t match the format that API Gateway expects. Lambda body contains the wrong type for field “headers” this only happens on redirect response as far as I can tell. This is coming from an ionized handler. I have v. little experience with ions, lambda etc. so maybe this is a common problem? Thanks!

Joe Lane18:08:51

What headers, if any, are you returning on a redirect response? Presumably you are the one redirecting, correct?

Daniel Jomphe19:08:39

Hi! When I used ion lambdas, IIRW, I wrapped my responses thusly:

(defn OK [body-str] {:status 200
                     :headers {"Content-Type" "application/json"}
                     :body body-str})


Response is along the lines of…

{:status 302,
 :headers {"Location" "/projects"},
 :body "",
 :flash {,,,},
 :session {:identity ,,,}}
pretty standard I guess. Need to add some logging around this to gain bit more visibility. Which is actually my other question. In an Ions app is “normal” logging supposed to be replaced/supplemented with e.g. cast/event . suggests that this is done somewhat automatically when logging is going through slf4j, without additional configuration, am I understanding that correctly? Cheers!

Daniel Jomphe00:08:49

I think you're right, but like the page said, only levels above WARN are cast this way.

Ben Hammond20:08:10

Is there a that I can use to exchange a cognito authorisation code for an access token as in


what's the max size on a transaction? if I need to divide my transaction into smaller batches, is there an easy way to share tempids?


We've hit timeouts using client at some reasonably big transactions (usually during ETL). About sharing the tempids, no generic advice, maybe you can try to batch the entities so it's less of an issue, or propegate the temp-ids from the previous transaction into the next

🙏 2

actually it turns out I was hitting the default 1000 pull limit. that said, my question stands out of curiousity. would be neat if I could plug in a tempid map returned by a previous transaction and have datomic use it to translate tempids in a the current transaction


this is a relatively straightforward function to write. you can even do it very naively with clojure.walk

👍 3