# Parameterizing Ion configuration

**URL:** <https://forum.datomic.com/t/parameterizing-ion-configuration/479>\
**Category:** Datomic Applications\
**Created:** [June 21, 2018, 12:14am UTC](https://forum.datomic.com/t/parameterizing-ion-configuration/479 "2018-06-21T00:14:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![markaddleman](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@markaddleman](https://forum.datomic.com/u/markaddleman)\
**Post date:** [June 21, 2018, 12:14am UTC](https://forum.datomic.com/t/parameterizing-ion-configuration/479/1 "2018-06-21T00:14:26Z")

</div>

How would we parameterize the configuration for ions? For example, we have multiple Datomic databases - one each developer. How would we configure a lambda to use one database or another?

In our current development workflow, we would set environment variables for lambdas but there doesn’t seem to be a parallel concept for ions.

---

<div class="post-metadata">

**Author:** ![eoliphant](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@eoliphant](https://forum.datomic.com/u/eoliphant)\
**Post date:** [July 16, 2018, 11:00pm UTC](https://forum.datomic.com/t/parameterizing-ion-configuration/479/2 "2018-07-16T23:00:52Z")

</div>

@stu has mentioned using say the Parameter Store from AWS Systems Manager. I’m just about to start playing with it myself. To ‘root’ your vars you could transact something into the DB (which i’m less than thrilled with lol), or perhaps read an ENV tag off of the instance with the ec2 api

---

<div class="post-metadata">

**Author:** ![markaddleman](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@markaddleman](https://forum.datomic.com/u/markaddleman)\
**Post date:** [July 22, 2018, 8:00pm UTC](https://forum.datomic.com/t/parameterizing-ion-configuration/479/3 "2018-07-22T20:00:01Z")

</div>

Thanks. That makes sense except for one case: Which database should the client connect to? Maybe this just isn’t an issue in real use of Ions.

---

<div class="post-metadata">

**Author:** ![eoliphant](https://avatars.discourse-cdn.com/v4/letter/e/96bed5/32.png) [@eoliphant](https://forum.datomic.com/u/eoliphant)\
**Post date:** [July 23, 2018, 1:05am UTC](https://forum.datomic.com/t/parameterizing-ion-configuration/479/4 "2018-07-23T01:05:57Z")

</div>

Actually it’s a good question lol. I think the answer is ultimately ‘it depends’. if you’re doing a system/app per env (dev,test,etc) then you could always use the same DB name(s).

---

<div class="post-metadata">

**Author:** ![cjsauer](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.datomic.com/cjsauer/32/346_2.png) [@cjsauer](https://forum.datomic.com/u/cjsauer)\
**Post date:** [May 28, 2019, 9:40pm UTC](https://forum.datomic.com/t/parameterizing-ion-configuration/479/5 "2019-05-28T21:40:00Z")

</div>

@markaddleman did you ever come up with a satisfying solution to this?

---

<div class="post-metadata">

**Author:** ![markaddleman](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@markaddleman](https://forum.datomic.com/u/markaddleman)\
**Post date:** [May 28, 2019, 10:33pm UTC](https://forum.datomic.com/t/parameterizing-ion-configuration/479/6 "2019-05-28T22:33:56Z")

</div>

I did not. @stu suggested using initialization code within a namespace as a way to get around the limitation but I never got around to trying it.

---

<div class="post-metadata">

**Author:** ![markaddleman](https://avatars.discourse-cdn.com/v4/letter/m/a8b319/32.png) [@markaddleman](https://forum.datomic.com/u/markaddleman)\
**Post date:** [March 26, 2020, 8:25pm UTC](https://forum.datomic.com/t/parameterizing-ion-configuration/479/7 "2020-03-26T20:25:03Z")

</div>

Updating with info from Slack channel: https://clojurians.slack.com/archives/C03RZMDSH/p1585240883030900
