Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/techgaun/dynamodb-copy-table
A simple python script to copy dynamodb table (useful for achieving renaming of table)
https://github.com/techgaun/dynamodb-copy-table
amazon-web-services dynamodb dynamodb-table hacktoberfest python-script
Last synced: about 1 month ago
JSON representation
A simple python script to copy dynamodb table (useful for achieving renaming of table)
- Host: GitHub
- URL: https://github.com/techgaun/dynamodb-copy-table
- Owner: techgaun
- License: mit
- Created: 2015-09-17T21:01:30.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-10-07T05:33:19.000Z (about 4 years ago)
- Last Synced: 2024-08-03T18:22:09.380Z (4 months ago)
- Topics: amazon-web-services, dynamodb, dynamodb-table, hacktoberfest, python-script
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 163
- Watchers: 7
- Forks: 70
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nepal - DynamoDB Table Copy
README
# dynamodb-copy-table-python3
A simple python 3 script to copy dynamodb table---
### Requirements
- Python 3.x
- boto (`pip install boto`)### Usage
A simple usage example:
```shell
$ python dynamodb-copy-table.py src_table dst_table
```The following environment variables can be used:
Variable | Purpose
--- | ---
`AWS_DEFAULT_REGION` | Select the region (the default region is `us-west-2`)
`DISABLE_CREATION` | Disable the creation of a new table (Useful if the table already exists)
`DISABLE_DATACOPY` | Disable the copying of data from source table to destination table```shell
$ AWS_DEFAULT_REGION=us-east-1 DISABLE_CREATION=yes DISABLE_DATACOPY=yes \
python dynamodb-copy-table.py src_table dst_table
```#### Docker Image
The docker image is available as [techgaun/dynamodb-copy-table:latest](https://hub.docker.com/r/techgaun/dynamodb-copy-table)
in the official docker hub that you can pull from.Usage:
```shell
# pull image down
docker pull techgaun/dynamodb-copy-table:latest# invoke help
$ docker run --rm -it techgaun/dynamodb-copy-table:latest
Usage: dynamodb-copy-table.py# invoke copy
docker run -e AWS_ACCESS_KEY_ID=abc -e AWS_SECRET_ACCESS_KEY=def --rm -it techgaun/dynamodb-copy-table:latest src dest
```### References
- [Import and Export DynamoDB Data using AWS Data Pipeline](http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-importexport-ddb.html)