# Datomic Ion Lifecycle Events or Hooks

**URL:** <https://forum.datomic.com/t/datomic-ion-lifecycle-events-or-hooks/1893>\
**Category:** Datomic Cloud\
**Created:** [July 9, 2021, 4:53am UTC](https://forum.datomic.com/t/datomic-ion-lifecycle-events-or-hooks/1893 "2021-07-09T04:53:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![furkan3ayraktar](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/furkan3ayraktar/32/507_2.png) [@furkan3ayraktar](https://forum.datomic.com/u/furkan3ayraktar)\
**Post date:** [July 12, 2021, 7:44am UTC](https://forum.datomic.com/t/datomic-ion-lifecycle-events-or-hooks/1893/2 "2021-07-12T07:44:33Z")

</div>

It should possible to hook into deployment events in Datomic Ions. You can create an EventBridge event for each step in the CodeDeploy deployment and trigger a Lambda function. I’ve done that before without an issue.

However, if you just want to execute a function to create connections, you can just place that function in one of the namespaces that gets loaded into your Ions application. As soon as Datomic loads your namespace, the function will be executed. [Here](https://forum.datomic.com/t/is-it-possible-to-have-a-worker-application-as-an-ion/1887/6) you can see my answer about starting a background thread to poll from a queue when the Datomic application is started. It could give an idea about how to implement in your case.

---

_[View the full topic](https://forum.datomic.com/t/datomic-ion-lifecycle-events-or-hooks/1893)._
