简体   繁体   中英

AWS: How to backup DynamoDB Local tables and import to AWS Service

I setup DynamoDB Local on a EC2 instance, loaded a dozen of tables with Python API.

java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -inMemory

Now I notice that the tables are stored in memory, and want to export the data and load to dynamodb web service . I didn't find any useful functions to export the db tables to a file ( https://boto3.readthedocs.io/en/latest/reference/services/dynamodb.html ).

I tried to access the local db through url http://ip:8000 , unfortunately it's not working:

--2017-08-20 21:49:19--  http://localhost:8000/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8000... connected.
HTTP request sent, awaiting response... 400 Bad Request
2017-08-20 21:49:19 ERROR 400: Bad Request.

Any suggestion is appreciated

There is a plugin https://github.com/99xt/dynamodb-schema-migrate which you could use to migrate the schema from to an AWS account. You can modify it a bit and use the local schema and use it to migrate the schema.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM