Backing up local DynamoDB tables and restoring on remote instance

0

My intended workflow is this:

  • Process data locally and store in my local instance of DynamoDB
  • Backup the local table
  • Restore the table on the remote instance for consumption by my serverless API

However, it seems the create-backup command is not implemented for local instances, which is bizarre. Nor do I see a way to restore one in this manner. Is there a better way to achieve what I'm trying to do?

asked a year ago365 views
1 Answer
0

The local version of DynamoDB (DynamoDB Local) is designed to be a testing environment, and as such, it does not support all the features of the DynamoDB web service, such as backing up and restoring tables.

You can write a script that uses AWS SDKs or AWS CLI to scan all items in the local DynamoDB table, save them into a file (like a JSON), and then use another script to read this file and write the items to the remote DynamoDB table.

I would also recommend using the NoSQL Workbench for Amazon DynamoDB. This cross-platform tool offers data modeling, visualization, and query development features, which could facilitate your data transfer process. Using NoSQL Workbench, you could easily build and manage your data models, visualize the data access patterns and even develop and test your queries in a convenient graphical interface. Notably, it includes DynamoDB local as an optional part of the installation process, which would help streamline the setup for your local DynamoDB instance. For more detailed information and guidance on how to use it, refer to the official documentation.

If the answer is helpful, please click "Accept Answer" and upvote it.

profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions