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.

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.

Trabaja con DynamoDB sin la Consola

DynoTable es un cliente de escritorio rápido para DynamoDB: explora tablas, ejecuta consultas estilo SQL y edita Items localmente.