ion/get-params to configure our Query Groups at runtime using values from our SSM Parameter Store, including which database to connect to based on the results of
The AWS API returns pages of 10 Parameter Store values at a time, but unfortunately the
ion/get-params function just throws an exception when passed a
:path key that contains more than 10 values. So an otherwise healthy, running Ion application can be easily broken by adding an 11th parameter to any parameter path ready by a project.
For example, an Ion project could need these parameter values to operate:
- /datomic-shared/prod/db-name <-- important for all queries
By adding an 11th parameter:
connections/clients/queries that rely on
/datomic-shared/prod/db-name will fail, because
ion/get-params will throw an exception.
Adding parameters to your AWS Parameter Store is seemingly “far” from Datomic and should normally be an innocuous event, but doing so can tank a healthy, production application. Sure, a team could have the disciple to organize their parameters so that path keys never reach more than 10 values, but that’s an important policy to remember and a harder one to enforce.
Is the best option just to avoid
ion/get-params all together, and implement a custom solution which handles pagination?