Closed rahulaga closed 11 months ago
I am using the bedrock.invoke_model( body=body, modelId=modelId, accept=accept, contentType=contentType ) and getting the above message. boto3 latest doc does suggest that the method is available in bedrock_runtime but this service is not available in the boto3-1.28.21
Hi,
In bedrock-boto3-setup.ipynb, in cell 6, try to set the endpoint url as below. Make sure you change the yourregion word to whichever region you are running in. e.g. us-east-1.
endpoint_url=os.environ.get("BEDROCK_ENDPOINT_URL", "https://invoke-bedrock.yourregion.amazonaws.com/")
Hi,
In bedrock-boto3-setup.ipynb, in cell 6, try to set the endpoint url as below. Make sure you change the yourregion word to whichever region you are running in. e.g. us-east-1.
endpoint_url=os.environ.get("BEDROCK_ENDPOINT_URL", "https://invoke-bedrock.yourregion.amazonaws.com/")
My endpoint seems to be fine and takes region into account: Output: Using region: us-east-1 boto3 Bedrock client successfully created! bedrock(https://bedrock.us-east-1.amazonaws.com/)
I don't think so. The response you get is returned when you don't change the current code in the cell of the notebook where BEDROCK_ENDPOINT_URL is passed as None. Your endpoint should look like invoke-bedrock.us-east-1.amazon.aws.com or bedrock-runtime.us-east-1.amazon.aws.com and not bedrock.us-east-1.amazon.aws.com.
I also see a recent merge on changing the endpoint URL handling (looks like bedrock-runtime is being produced as default instead of bedrock), you may consider to git pull for the recent changes and see whether that helps.
@alkayahan not sure where you got those URLs from? This is the only URL: https://catalog.us-east-1.prod.workshops.aws/workshops/a4bdb007-5600-4368-81c5-ff5b4154f518/en-US/20-intro/21-environmentsetup
Works fine with latest git pull and below versions: "boto3>=1.28.57" "awscli>=1.29.57" "botocore>=1.31.57"
%pip install --quiet langchain==0.0.305
I'm trying the intro on my local. The
list_foundation_models()
works fine so my setup should be good.However in
invoke_model
it fails. Any suggestions?