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?

質問済み 1年前358ビュー
1回答
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
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン