Carpenter is a set of tools designed to help you play with Dynamo tables on your local machine.
Carpenter is NOT designed to be used to manage your infrastructure against the real AWS DynamoDB service. For that use infrastructure as code tools like terraform.
Carpenter creates a table. If a name is not provided through the tableName parameter Carpenter will generate a uuid name. Is it also possible to create secondary indexes with the table via gsiNumber and lsiNumber parameter. For each global secondary index a couple of additional parameters (GSI<number>PK and GSI<number>SK) will be created. For local secondary indexes only one additional parameter will be created (LSI<number>SK);
Carpenter deletes a table, a table name must be provided.
Carpenter provides a list of the tables available in Dynamo.
Carpenter starts instructure/dynamo-local-admin Dynamo docker image which is based on amazon/dynamodb-local image and provides a nice GUI accessible at http://localhost:<dynamoPort>. A dynamoPort parameter can also be provided.
Carpenter stops Dynamo.
Carpenter scan a table and provide a count of the items found in the table. The scan is recursive, a table name must be provided. If you also want to return a list of all the documents provide --returnDocuments set to true.
Carpenter truncates a table. A table name must be provided.
Clone carpenter
git clone https://github.com/pikselpalette/carpenter.git
Use carpenter:
node bin/index --help
Example of a create table:
node bin/index --function createTable --tableName identity_local --gsiNumber 15 --lsiNumber 5