"errorMessage": "Unknown service: 'bedrock-agent-runtime'.

0

Getting "errorMessage": "Unknown service: 'bedrock-agent-runtime' in lambda function when using with Boto3 in python code.

but able execute aws bedrock-agent-runtime retrieve-and-generate in CLI

import json import boto3 def lambda_handler(event, context): client = boto3.client('bedrock-agent-runtime','us-west') #client = boto3.client(service_name="bedrock-agent-runtime", region_name="us-west-2") response = client.retrieve_and_generate(

1回答
0

Hello.

I think the version of boto3 may be old.
Please update the boto3 version to the latest version.

Looking at the changelog below, "bedrock-agent-runtime" has been added since 1.33.2.
So I think you need to make sure your boto3 version is newer than this.
https://github.com/boto/boto3/blob/develop/CHANGELOG.rst

profile picture
エキスパート
回答済み 3ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ