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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则