"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(

已提问 3 个月前833 查看次数
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 个月前

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

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

回答问题的准则