How does serverless offline start local dynamodb?


#1

If I start local dynamodb first (sls dynamodb start -p 8000 --migrate true &), then start serverless offline, it always complains the port 8000 is used.

Seems serverless offline wants to take care local dynamodb starting.

But if I start serverless offline directly (sls offline start), it starts local dynamodb, but ignore the option --migrate true.

I confirm I have put the custom variables in serverless.yml already:

custom:
  dynamodb:
      start:
        migrate: true

Serverless-offline plugin vs AWS SAM local
#2

@bill Did you ever solve this? I have the same issue.


#3

With serverless-offline v3.25.4 and serverless-dynamodc-local v0.2.30 the DynamoDB table specified in the resources section will be migrated on `serverless offline start’ with the following addition in your serverless.yml file.

custom:
  dynamodb:
    start:
      port: 8000
      inMemory: true
      migrate: true