-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
AWS boto3 : UnknownServiceError: Unknown service: 'Bedrock' #3914
Comments
Hi @user-preethy thanks for reaching out. Here is a Knowledge Center article to help with troubleshooting this issue: https://repost.aws/knowledge-center/lambda-python-runtime-errors. You mentioned that you already tried creating a Lambda layer, could you walks us through the steps that you took to do that? The Bedrock service was introduced in Boto3 1.28.57 and Botocore 1.31.57, and the default Lambda runtimes for Python are currently You can confirm which versions your Lambda function is using by adding: import boto3
import botocore
print(boto3.__version__)
print(botocore.__version__) |
Hi @tim-finnigan thanks for the reply. |
Hi @user-preethy thanks for following up. Can you confirm that your Lambda layer is attached here? In the article linked earlier, I recommend following the steps under the section Manually create a Lambda layer that uses the latest Boto3 version which involves using the AWS CLI. In the Lambda Developer Guide you can find more information on working with Lambda layers and packaging Python dependencies. |
Thanks @tim-finnigan Issue is resolved. |
|
Describe the feature
I am facing an issue with boto3 module in AWS. I am using boto3 module & running below code in python. Code execution is successful when running locally but fails with UnknownServiceError when executed in AWS Lambda.
bedrock = boto3.client(service_name='bedrock',region_name='us-east-1',endpoint_url='https://invoke-bedrock.us-east-1.amazonaws.com')
After a lot of research, I found that local boto3 version is 1.28.71 and AWS boto3 version is 1.26.90. I tried by adding latest boto3 as layer in lambda function, but its not working. Still showing old version.
Can anyone please help me with this?
Use Case
For using bedrock with lambda.
Proposed Solution
No response
Other Information
No response
Acknowledgements
SDK version used
Local boto3 version is 1.28.71 and AWS boto3 version is 1.26.90.
Environment details (OS name and version, etc.)
Windows 10
The text was updated successfully, but these errors were encountered: