Search code examples
amazon-web-servicesredisserverlessin-memory-databaseamazon-memory-db

Can I autostart my memoryDB instance or is always on?


I'm asking this due to pricing methods of this service, apparently I'm paying by the hour which seems to accumulate a lot of money. Can I stop and restart according to use?


Solution

  • Unfortunately, AWS MemoryDB for Redis service does not support stopping and starting again clusters unlike EC2 virtual machine instances. We can say it is always on as you said. Nevertheless, you can take snapshots of your data. This may achieve what you need.

    The process will be like this:

    1. Create a new MemoryDB cluster.
    2. Use this cluster as you want.
    3. Delete the cluster. When deleting, make sure you take a final snapshot. If you use AWS Console, the system will actually asks you if you want a final snapshot or not.
    4. When you want to continue to use MemoryDB, create a new cluster and specify the snapshot you took in previous step as starting point.

    Yet, creating and deleting MemoryDB clusters can take a few minutes. So, this process may not be suitable for majority of scenarios for production environments.