Git Product home page Git Product logo

delete-dynamodb-items's Introduction

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.

Contributing

Thank you for thinking of contributing! Please see the contributing guide.

Development

See the contributing guide.

delete-dynamodb-items's People

Contributors

halprin avatar renovate[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

delete-dynamodb-items's Issues

Custom DynamoDB Endpoint

Add ability to pass in a DynamoDB endpoint. This allows for deleting items in tables that are running locally in a DynamoDB local instance or some other instance of DynamoDB.

"Are you sure?" Query

Add a query before deleting the items that the user is sure they want to proceed. Add a CLI argument that automatically answers the query as yes.

Notes:

  • Consider asking the query after the initial describing of table and calculating the parallelism versus at the very beginning of execution.

Sign macOS Binaries

Sign the macOS binary so users don't need to manually approve the execution in System Preferences.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.