Datomic ion clarification: building application jar locally

Some members of my team are worried about the fact that our unit tests are run in a jar that has different dependencies added via datomic than when we run the tests locally or in our CI/CD pipelines.

Is there a way to build the same jar locally that is used on the ec2 instances in the cloud?

When you run a push operation, the Ion tooling will provide a list of any dependency overrides (https://docs.datomic.com/cloud/ions/ions-reference.html#dependency-conflicts) that Datomic will perform.
You should be able to use this list to ensure that your local dependencies match those in the Cloud environment.