Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table Items not persisted across server starts #253

Open
lmuntaner opened this issue Jun 8, 2020 · 4 comments
Open

Table Items not persisted across server starts #253

lmuntaner opened this issue Jun 8, 2020 · 4 comments

Comments

@lmuntaner
Copy link

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

  1. Start offline server
  2. Insert items into DynamoDB
  3. Close server
  4. Start offline server
  5. 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.

@lunizxx
Copy link

lunizxx commented Jun 8, 2020

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: #254

@lmuntaner
Copy link
Author

Yes, it seems to be a related issue.

@j0b0sapi3n
Copy link

@Imuntaner Did you ever figure this out? I'm running into the same issue.

@lmuntaner
Copy link
Author

We are using AWS docker image directly. Not this plugin anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants