you can run offline version of dynamodb on your localhost. The easiest is to have it in container in docker. Then you dont have to manage it at all and it will work in every environment that has docker installed.
This is what we have in package.json scripts for serverless application
"start": "sls offline start",
"start-local": "npm run force-dynamo sls offline start --stage=localhost",
"force-dynamo": "npm run stop-dynamo && npm run start-dynamo",
"start-dynamo": "docker run -d -p 8000:8000 dwmkerr/dynamodb -sharedDb",
"stop-dynamo": "docker stop $(docker ps -a -q --filter ancestor=dwmkerr/dynamodb --format=\"{{.ID}}\")",
However if you do not care that much about CI/CD pipeline or reusability on multiple devices -> you can just install dynamoDB, run it and based on configuration just target your offline/online dynamodb.