Skip to content

Instantly share code, notes, and snippets.

@alecbw
Last active September 11, 2022 18:31
Show Gist options
  • Save alecbw/9c71ccf905770e6514c271af645f00cc to your computer and use it in GitHub Desktop.
Save alecbw/9c71ccf905770e6514c271af645f00cc to your computer and use it in GitHub Desktop.
Add to your bash_profile to quickly lookup a dynamo item by key and print two of the resulting fields
function checkUser() {
aws dynamodb get-item --table-name userTable --key '{"email": {"S": "'"$1"'"}}' | jq '.Item.field_1.S + " " + .Item.field_2_int.N'
}
# to use:
checkUser foo@bar.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment