0.3.4 • Published 8 years ago
dynamin v0.3.4
Dynamin
Dynamin can minimize(i.e. set to 1) the read and write capacity units of Amazon DynamoDB tables and its indexes.
Installation
$ npm install -g dynaminUsage
Before using dynamin, you need to set AWS credentials and region in some ways:
~/.aws/credentials~/.aws/config- Environment variables
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION
$ dynamin --help
Options:
--help Show help [boolean]
--version Show version number [boolean]
-t, --table Table name [string]
--tags Lists of tags (keys and values) [array]
--restore Restores capacity units [boolean]
-r, --region AWS region [string]
-p, --profile Profile name in your credential file [string]Example
Minimize a table.
$ dynamin -t usersMinimize tables tagged with the specified keys and values.
Dynamin follows the tag filter syntax of Resource Groups Tagging API.
So the following minimizes tables tagged with (stage=dev or stage=test) and (type=web).
$ dynamin --tags key=stage,values=dev,test key=type,values=webCapacity unit values will be stored in a JSON file located in ~/.config/configstore/dynamin.json.
You can restore the values by the following command.
$ dynamin --restore