Skip to content
Advertisement

How to solve: Error: Unable to initialize main class com.amazonaws.services.dynamodbv2.local.main.ServerRunner

Hey guys I’m trying to run Dynamodb with serverless locally executing the following command: sls dynamodb start --migrate --stage local

And I get an error: enter image description here

Before that I installed with this sls dynamodb install --stage local and everything seems ok.

I take a look if the problems is the port but isn’t.

Advertisement

Answer

Summary: perhaps try deleting .dynamodb and re-initializing.

Situation: I ran into this same error while testing my developer startup instructions in a second directory, where everything was working fine in the first one. In comparing the two directories, I found significant differences between the two .dynamodb directories, indicating that the install / initialization had failed. So I simply deleted the .dynamodb in the new location and re-initialized DynamoDB local. Solved the problem.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement