Skip to content

Instantly share code, notes, and snippets.

@croesus
croesus / ddbtablescan.sh
Last active November 5, 2024 08:52
AWS CLI scan DynamoDB table with rate limiting
#!/bin/bash
if [ "$#" -ne 6 ]; then
echo "Usage: ddbtablescan.sh <profile> <table> <attributeToFilterOn> <attributeValueToFilterWith> <maxItemsPerSec> <listOfAttributesToReturn>"
echo "e.g."
echo "ddbtablescan.sh my-profile Users company Amazon 10 firstName,lastName,email"
exit 1
fi
found=$(which aws)
@bkahlert
bkahlert / error-handling-out.md
Last active October 3, 2024 04:08
Bash Error Handling — shell options -e/errexit, inherit_errexit, -E/errtrace and the ERR trap

Bash Error Handling — shell options -e/errexit, inherit_errexit, -E/errtrace and the ERR trap

This Markdown file is 90% the output of error_handling.bash.

I wrote the script / this document to describe the shell options errexit, inherit_errexit, and errtrace as well as the ERR trap and their conditions and interactions in more detail as this is what I always failed to understand with the pieces of information I found so far.

References