In order to run tests locally (so we can refactor fast), and also to break coupling between the deployed dev environment and versions we run on our laptops (to minimise onboarding pain and accidental side effects), this PR introduces a way to run a local copy of DynamoDB.
It gets the app to a point where it can connect to dDB and run, although I haven't tested it doing anything with a local dynamoDB. Given that running a local dynamoDB is still optional at this point (and not turned on by default!) I'm raising this PR so we can get this into the repo to build on — the old behaviour shouldn't be affected.
Changes included in this PR
read values out of the cloudformation templates to automate the process of configuring a local dynamoDB
run this process in the Makefile target for setting up a local dev env
include instructions for starting dynamodb-local in the README
for tests, automatically create test tables in the same locally-running ddb. The next PR will use them!
Deficiency
There's no obvious way to run DDB as a service via homebrew, so to run tests in the near future it will be necessary to start dynamodb-local in a separate terminal window (or equivalent!) before running the tests. Perhaps we can docker-compose our way out of that soon!
In order to run tests locally (so we can refactor fast), and also to break coupling between the deployed dev environment and versions we run on our laptops (to minimise onboarding pain and accidental side effects), this PR introduces a way to run a local copy of DynamoDB.
It gets the app to a point where it can connect to dDB and run, although I haven't tested it doing anything with a local dynamoDB. Given that running a local dynamoDB is still optional at this point (and not turned on by default!) I'm raising this PR so we can get this into the repo to build on — the old behaviour shouldn't be affected.
Changes included in this PR
Deficiency
There's no obvious way to run DDB as a service via homebrew, so to run tests in the near future it will be necessary to start dynamodb-local in a separate terminal window (or equivalent!) before running the tests. Perhaps we can docker-compose our way out of that soon!