Fork me on GitHub

not terrible at all, have you seen codeq?


Hi! Any suggestions on testing Lambda/APIGW ions on a local MacOS laptop? I am trying out AWS SAM. How do I build a deployment package for my application locally? Is it just the zip file that I would deploy to Datomic Cloud?


There’s no ‘package’ per se with ions, though the ‘push’ does shoot your code as is + dependencies up to an S3 bucket/folder. I’d check out Stu’s videos on the typical workflow. but in general it’s very much in line with your typical REPL-driven/oriented workflow. You can test/exercise your generic pure funcs as is, you can connect to the db in question from the repl, most ion/datomic funcs that can be ‘embedded’, like transaction functions, are pure can (and should) be t tried out directly. At that point, you can then push, then interactively exercise them on the server. I’m literally doing that right now. Helping one of my devs optimize some stuff, so I created a new transaction func, spec’d and tested it totally client side, then ‘allowed’ and pushed it, and ran some actual transactions that referenced it.


So you avoided the whole SAM local workflow, then?


sorry just saw lol, yeah, there’s less need for it IMO. while tx, query, etc funs do have to be on the server at some point. You can generally do a ton of testing, etc with them locally, so by the time you actually push them, you’re pretty confident that they’re doing what you expect.


must query functions be deployed to the main (cloud) Compute node, or can they be deployed as part of Query Groups?


update: yes. found it in the docs 🙂


Anywhere :)


hmm, are you sure? i have a query group that makes use of query functions. i recently removed them from the main compute group and now the query groups fail.


by removed i mean that the query functions were defined in both Ions projects due to forking the code base. when i removed them from the main compute group's configuration and deployed to the main compute group the query groups then failed.


@joshkh failed to do what?


you can definitely have a different set of query functions on your primary group than on a given query group


but you can only invoke them if you are connected to that query group


yup, that's what i'm thinking. i might be deploying to the query group but connecting to the main compute group.


upon further testing, it looks like the client's :endpoint value overrides the client's :query-group value, but only when running locally.


@ghadi I have not seen codeq