DynamoDB Local: Address already in use (port 8000)

TL;DR — DynamoDB Local binds port 8000 by default, and something already holds it — an earlier DynamoDB Local you didn't stop, another service, or a duplicate serverless-offline/container. Either free port 8000 or start Local on a different port with -port (and point your client at it).

What it means

Exception in thread "main" java.net.BindException: Address already in use
   ... Failed to bind to port 8000

DynamoDB Local is a Java process that opens a listening socket on port 8000. If that port is already bound, the JVM can't claim it and exits with BindException. It's purely a local port conflict — nothing to do with AWS or credentials.

Why it happens

  • A previous DynamoDB Local is still running — a prior java -jar DynamoDBLocal.jar (or docker run) you never stopped.
  • Another service owns 8000 — a dev server, proxy, or unrelated app on the same port.
  • Duplicate toolingserverless-dynamodb-local and serverless-offline both trying to bind 8000, or two docker-compose up stacks.
  • A crashed instance left the port bound briefly (TIME_WAIT), or a zombie container.

Serverless and test runners

The serverless-dynamodb-local plugin and Jest globalSetup hooks often start Local implicitly — if you also run docker run -p 8000:8000 amazon/dynamodb-local manually, the second bind attempt dies with BindException even though Local is already healthy. Pick one launcher per machine session.

On macOS, orphaned Java processes from an IDE test runner are a frequent culprit — lsof -i :8000 often shows java with a PID from an earlier Gradle run.

How to fix it

  1. Find what owns the port:
    lsof -i :8000                       # macOS / Linux
    netstat -ano | findstr :8000        # Windows (note the PID)
  2. Stop that process (or the old DynamoDB Local):
    kill <PID>                          # macOS / Linux
    taskkill /PID <PID> /F              # Windows
  3. Or run DynamoDB Local on a different port and update your client:
    java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -port 8001
    # then: endpoint = http://localhost:8001
  4. Docker? Change the host side of the mapping (-p 8001:8000) and connect to 8001.
  5. Remove duplicate plugins/stacks so only one process tries to bind the port.

In DynoTable

After freeing port 8000 (or moving Local to -port 8001), install DynoTable and add a Local profile in Settings → Profiles → Add Profile: set endpoint http://localhost:8000 (or your alternate port), a placeholder region, and alphanumeric dummy credentials. Test Connection confirms the emulator is listening before you browse tables. Walkthrough: Running DynamoDB Local · Connect to DynamoDB Local & LocalStack.

When you change ports, update the profile endpoint to match — a profile still pointing at :8000 while Local listens on :8001 produces connection refused even after the bind conflict is resolved. The DynamoDB JSON converter helps load seed data once Local is reachable.

Sources

Work with DynamoDB without the Console

A fast DynamoDB desktop client that runs the real SQL DynamoDB can’t — JOINs, GROUP BY, aggregates — with visual editing and an AI agent on your own Bedrock keys.

Free 30-day trial, no credit card — then the Free plan with no time limit.