Files
dotfiles/zsh/.local/share/zsh/functions/aws-get-bedrock-profile
2026-03-13 09:19:28 -04:00

18 lines
549 B
Plaintext

aws-get-bedrock-profile () {
profile_id=$(aws bedrock list-inference-profiles \
| jq -r '.inferenceProfileSummaries
| map(select(.inferenceProfileId | startswith("us.")))
| sort_by(.inferenceProfileName)
| .[]
| [.inferenceProfileId, .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_id" ]] && return 1
echo "$profile_id"
}