zsh: add aws-get-bedrock-profile

This commit is contained in:
Jason Swank
2026-01-13 13:00:39 -05:00
parent c36d1fa1f8
commit 9ec3e1124b

View File

@@ -0,0 +1,17 @@
aws-get-bedrock-profile () {
profile_arn=$(aws bedrock list-inference-profiles \
| jq -r '.inferenceProfileSummaries
| map(select(.inferenceProfileId | startswith("us.")))
| sort_by(.inferenceProfileName)
| .[]
| [.inferenceProfileArn, .inferenceProfileName, .description]
| @tsv' \
| fzf \
--header="$(printf '%-30s\t%s\n' 'NAME' 'DESCRIPTION')" \
--no-preview \
--delimiter='\t' \
--with-nth=2,3 \
| awk '{print $1}')
[[ -z "$profile_arn" ]] && return 1
echo "$profile_arn"
}