Simple DynamoDB dump to S3.
Read & write rates are limited by applying a ratio (read-percentage/write-percentage) to table's provisioned capacities.
$ docker run \
-e AWS_ACCESS_KEY=... \
-e AWS_SECRET_KEY=... \
-e AWS_REGION=... \
sensefly/dynamodb-to-s3 --help
Usage: <main class> [options] [command] [command options]
Options:
--help
Commands:
backup Backup DynamoDB tables to S3 bucket.
Usage: backup [options]
Options:
* -t, --table
Table to backup to S3.
Repeat this param to backup multiple tables.
Default: []
* -b, --bucket
Destination S3 bucket.
Default: <empty string>
--read-percentage
Read percentage based on current table capacity. Cannot be used with '--read-capacity'.
--read-capacity
Read capacity (useful if auto scaling enabled). Cannot be used with '--read-percentage'.
-p, --pattern
Destination file path pattern.
Default: yyyy/MM/dd
restore Restore DynamoDB table from json file hosted on S3.
Usage: restore [options]
Options:
* -t, --table
Table to restore.
Default: <empty string>
* -s, --source
Full S3 path to a JSON backup file
(s3://my-bucket/folder/my-table.json).
-w, --write-percentage
Write capacity percentage.
Default: 0.5
docker run \
-e AWS_ACCESS_KEY=... \
-e AWS_SECRET_KEY=... \
-e AWS_REGION=... \
sensefly/dynamodb-to-s3 backup \
--table my-table \
--table my-other-table \
--read-capacity 100 \
--bucket my-bucket
docker run \
-e AWS_ACCESS_KEY=... \
-e AWS_SECRET_KEY=... \
-e AWS_REGION=... \
sensefly/dynamodb-to-s3 restore \
--table my-table \
--source s3://my-bucket/2017/10/27/my-table.json
AWS credentials are read using DefaultAWSCredentialsProviderChain:
AWS_ACCESS_KEY, AWS_SECRET_KEY and AWS_REGIONaws.accessKeyId and aws.secretKey~/.aws/credentials) shared by all AWS SDKs and the AWS CLIAWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment
variable is set and security manager has permission to access the variableContent type
Image
Digest
Size
92.6 MB
Last updated
over 8 years ago
docker pull sensefly/dynamodb-to-s3