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

asked 7 months ago6006 views
1 Answer
0
Accepted Answer

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

answered 7 months ago
profile pictureAWS
EXPERT
reviewed 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions