Boto3 - Unknown Service 'Bedrock'

0

Trying to use Bedrock following the release today and despite being on the latest version of boto3 I get the error from this code.

`import boto3 import json

bedrock = boto3.client( service_name='bedrock', region_name='us-east-1' )

bedrock.list_foundation_models()`

UnknownServiceError: Unknown service: 'bedrock'.

Running Mac OS X

Boto3 Version: 1.28.56

Botocore version: 1.31.56

AWS CLI version: aws-cli/2.13.22 Python/3.11.5 Darwin/22.6.0 exe/x86_64 prompt/off

已提問 8 個月前檢視次數 6255 次
1 個回答
0
已接受的答案

Turns out boto3 1.28.57 was released at the same time as me posting this. Upgrading solved the issue.

已回答 8 個月前
profile pictureAWS
專家
已審閱 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南