delete-dynamodb-items

module
v1.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2021 License: MIT

README

delete-dynamodb-items

Bulk delete items from a DynamoDB table.

Download

You can get delete-dynamodb-items from the releases section of this GitHub repository. There you will find downloads for your operating system and CPU architecture.

Usage

Warning: running this command will result in all the items in the specified table to be deleted immediately! There is no "are you sure?" prompt.

delete-dynamodb-items <table name> [--endpoint=URL] [--filter-expression=string] [--expression-attribute-names=JSON] [--expression-attribute-values=JSON]

The program uses the default AWS credential algorithm to determine what IAM entity and region is used. E.g. the ~/.aws/credentials file, the AWS_* environment variables, etc.

Filter Expressions

You can specify a special expression to filter out items you don't want deleted. AKA, the item will be deleted if the filter matches. You can learn more about filter expressions in AWS's DynamoDB Developer Guide and the filter-expression section in the AWS CLI.

Use a combination of the --filter-expression=, --expression-attribute-names=, and --expression-attribute-values= options. These options work the same way as the options on the AWS CLI.

E.g. --filter-expression='#k > :v' --expression-attribute-names='{"#k": "number"}' --expression-attribute-values='{":v": {"N": "50"}}'

Custom Endpoint

You can customize the DynamoDB endpoint with the --endpoint= (or -e) option. Set it to the URL of the endpoint. E.g. --endpoint=http://localhost:8002. If unspecified, the default AWS endpoints are used.

Build

Run the following to compile your own copy from source.

go build -o delete-dynamodb-items -v ./cmd/

Directories

Path Synopsis
external
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL