getmoto / moto

A library that allows you to easily mock out tests based on AWS infrastructure.

Home Page:http://docs.getmoto.org/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can data around Cognito be persisted when using docker?

sion908 opened this issue · comments

commented

Moto always helps me.
However, when I stop Docker, the data is lost.
Is there a way to make it persistent?
If there is, it would be helpful if it was written in the documentation.
I especially use services related to cognito.

  mock-aws-local:
    image: motoserver/moto:latest
    environment:
      MOTO_PORT: 4000
    ports:
      - ${AWS_LOCAL_PORT:-4000}:4000

Hi @sion908, there is no way to persist the state, but you can use the Recorder to re-rum a specific set of operations.

https://docs.getmoto.org/en/latest/docs/configuration/recorder/index.html

Does that help you?