Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mingrammer/dynamodb-toolkit
A command line toolkit for aws dynamodb
https://github.com/mingrammer/dynamodb-toolkit
aws dynamodb toolkit
Last synced: 4 days ago
JSON representation
A command line toolkit for aws dynamodb
- Host: GitHub
- URL: https://github.com/mingrammer/dynamodb-toolkit
- Owner: mingrammer
- License: mit
- Created: 2019-01-31T12:15:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-17T11:01:51.000Z (almost 5 years ago)
- Last Synced: 2024-08-05T04:03:23.196Z (3 months ago)
- Topics: aws, dynamodb, toolkit
- Language: Go
- Size: 24.4 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DynamoDB Toolkit
A command line toolkit for aws dynamodb
dynamotk is a command line toolkit for aws dynamodb that provides some useful utilities that are not supported by dynamodb operations and official aws cli tools.
## Installation
### Using go get
> Go version 1.13 or higher is required.
```
go get github.com/mingrammer/dynamodb-toolkit/cmd/dynamotk
```### Using [homebrew](https://brew.sh)
```
brew tap mingrammer/homebrew-taps
brew install dynamodb-toolkit
```### Using .tar.gz archive
Download gzip file from [Github Releases](https://github.com/mingrammer/dynamodb-toolkit/releases/latest) according to your OS. Then, copy the unzipped executable to under system path.
## Features
- Table truncate
- Coming soon... (maybe dump/restore features)## Usage
### Truncate
```console
# Truncate the `user` table from local dynamodb.
dynamotk --endpoint http://localhost:8000 truncate --table-names user# Truncate the `user`, `item` tables from aws dynamodb with default credentials.
dynamotk truncate --table-names user,item# You can also pass the `access key id`, `secret access key`, `profile` and `region` optionally. (see `dynamotk -h`)
dynamotk --access-key-id xxx --secret-access-key xxx truncate --table-names user,item# Truncation is just (concurrently) repeating the delete operations for all keys.
# So if your tables are big, it can cause cost overhead.
# In this case, you can use `--recreate` option.
# It will delete the table itself and recreate the table while preserving the description.
dynamotk --profile prod --region ap-northeast-2 truncate --table-names largetable --recreate
```## Known issues
When throttling happens, `dynamotk` does not retry read or write (delete request), so some items could be remaining not deleted. I should support `backoff-retry` algorithm to fix it.
For now, you should run the `truncate` command multiple times until the table becomes empty to overcome this issue or use `--recreate` option.
## License
MIT