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 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.