Fork me on GitHub

What is the correct way to schedule a lambda ion say every 30min? I tried to click it in "EventBridge" but it errs:

datomic.ion.lambda.handler.exceptions.Incorrect: datomic.ion.lambda.handler.exceptions.Incorrect
--- Is there a command to remove ions? --- where can I read on logging from inside an ion?


datomic.ion.lambda.handler.exceptions.Incorrect: datomic.ion.lambda.handler.exceptions.Incorrect
clojure.lang.ExceptionInfo: null {:cognitect.anomalies/category :cognitect.anomalies/incorrect, :cognitect.anomalies/message nil}
	at datomic.ion.lambda.handler$throw_anomaly.invokeStatic(handler.clj:25)
	at datomic.ion.lambda.handler$throw_anomaly.invoke(handler.clj:21)
	at datomic.ion.lambda.handler.Handler.on_anomaly(handler.clj:175)
	at datomic.ion.lambda.handler.Handler.handle_request(handler.clj:205)
	at datomic.ion.lambda.handler$fn__3856$G__3781__3861.invoke(handler.clj:68)
	at datomic.ion.lambda.handler$fn__3856$G__3780__3867.invoke(handler.clj:68)
	at clojure.lang.Var.invoke(
	at datomic.ion.lambda.handler.Thunk.handleRequest(

Daniel Jomphe14:11:11

If you remove references to an ion from ion-config.edn, the next deployment will delete the orphaned lambda(s). As for you original question, I let other people answer it.


I see thanks

Joe Lane16:11:49

You can invoke a Lambda however you'd like. Event-Bridge (formerly CloudWatch Events) is a fine option for a scheduled "cron" task.

Joe Lane16:11:01

@U02CV2P4J6S If you're still having trouble with this, you can follow the project, specifically, the section on for inspiration.


@U0CJ19XAM hm. Do you know if the event bridge has the correct permissions and such by default? I guess I'll try making a simple one work

Joe Lane16:11:39

Datomic doesn't give any AWS services permissions to invoke Lambda Ions by default.


Ah alright. Then I know I have to grant the permission/role somehow

Joe Lane16:11:22

I'd follow but use the Lambda Ion instead of the javascript one they show you how to make. Specifically, you need to do the part (that I can't link to facepalm ) that starts with the phrase To grant the EventBridge service principal....

👀 1

thanks a lot that was the thing

💯 1