Last active
September 11, 2022 18:31
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment