serverless-dynamodb-local
serverless-dynamodb-local copied to clipboard
Table Items not persisted across server starts
Actual Behaviour
Configuration in serverless.yml
.
dynamodb:
start:
port: 8089
migrate: true
inMemory: false
stages:
- ${self:provider.stage}
After closing and starting up again serverless offline the database is restarted and all data is lost. As if it was using inMemory
. But inMemory
is set to false
.
It seems that the tables are created after every sls offline start
.
This also happens with sls dynamodb start
.
Expected Behaviour
sls offline start
does not create tables if they already exist.
Steps to reproduce it
- Start offline server
- Insert items into DynamoDB
- Close server
- Start offline server
- Scan table -> Table is empty
LogCat for the issue
None
Screenshots of the issue
None
Would you like to work on the issue?
I would love to, but it seems that there is something I am doing wrong. It doesn't seem a bug in the library.
I'm trying to do the same thing using Docker in order to provide persistent data but this plugin is actually cannot create tables. There's a problem about migrating tables i guess. But you have to use Docker in order to provide persistent data. Check my issue: https://github.com/99xt/serverless-dynamodb-local/issues/254
Yes, it seems to be a related issue.
@Imuntaner Did you ever figure this out? I'm running into the same issue.
We are using AWS docker image directly. Not this plugin anymore.