18 lines
549 B
Plaintext
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"
|
|
}
|