boto / boto3

AWS SDK for Python
https://aws.amazon.com/sdk-for-python/
Apache License 2.0
8.99k stars 1.86k forks source link

bedrock-runtime converse method not available on boto3 1.34.42 #4173

Closed d-plz closed 3 months ago

d-plz commented 3 months ago

Describe the bug

The converse method, which is documented to be part of the Amazon Bedrock Converse API, is not available in the BedrockRuntime client in the AWS Lambda Python 3.12 runtime.

Expected Behavior

Converse as a method based on https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-runtime/client/converse.html#

Current Behavior

ERROR: Can't invoke 'xyz'. Reason: 'BedrockRuntime' object has no attribute 'converse'

Reproduction Steps

import json
import boto3

def lambda_handler(event, context):
    client = boto3.client("bedrock-runtime", region_name="us-east-1")
    methods = dir(client)
    return {
        'statusCode': 200,
        'body': json.dumps(methods)
    }

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.34.42

Environment details (OS name and version, etc.)

aws lambda console python runtime

nateprewitt commented 3 months ago

Hi @davidplasencia, if you check the release notes the converse API for boto3 was released yesterday in 1.34.131.

You'll either need to update your lambda layer or bundle a more recent version of boto3, botocore, and s3transfer with your function. You can find full documentation on this in the Working with .zip file archives for Python Lambda functions developer guide.

d-plz commented 3 months ago

Hi @davidplasencia, if you check the release notes the converse API for boto3 was released yesterday in 1.34.131.

You'll either need to update your lambda layer or bundle a more recent version of boto3, botocore, and s3transfer with your function. You can find full documentation on this in the Working with .zip file archives for Python Lambda functions developer guide.

Thanks, Nate! I misread the version number and assumed that the console always had the latest version pre-installed.

github-actions[bot] commented 3 months ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.