"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 réponse
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
EXPERT
répondu il y a 3 mois
profile picture
EXPERT
vérifié il y a 2 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions