Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
d-plz opened this issue Jun 23, 2024 · 3 comments
Closed

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

d-plz opened this issue Jun 23, 2024 · 3 comments
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information.

Comments

@d-plz
Copy link

d-plz commented Jun 23, 2024

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

@d-plz d-plz added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Jun 23, 2024
@nateprewitt
Copy link
Contributor

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.

@nateprewitt nateprewitt added closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information. and removed bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Jun 23, 2024
@d-plz
Copy link
Author

d-plz commented Jun 23, 2024

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.

@d-plz d-plz closed this as completed Jun 23, 2024
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closing-soon This issue will automatically close in 4 days unless further comments are made. guidance Question that needs advice or information.
Projects
None yet
Development

No branches or pull requests

2 participants