terricain / aioboto3

Wrapper to use boto3 resources with the aiobotocore async backend
Apache License 2.0
743 stars 76 forks source link

Feature Request: New Service support for "bedrock-runtime" #317

Closed JackKolb-ElationHealth closed 11 months ago

JackKolb-ElationHealth commented 12 months ago

Description

I'm creating a AWS bedrock microservice that uses async boto for nonblocking requests/responses. This microservice is calling AWS bedrock, a relatively new service that provides developer access to LLMs like Claude.

What I Did In Boto3

bedrock = boto3.client(service_name='bedrock-runtime')

What I Did In AIOBoto3

async with self._session.client('bedrock-runtime', config=retry_config, **client_kwargs) as client_instance:
    self._client = client_instance

The error :

botocore/loaders.py\", line 408, in load_service_model\n raise
 UnknownServiceError(\nbotocore.exceptions.UnknownServiceError: Unknown service: 'bedrock-runtime'.

I believe this is due to the current dep version of botocore being a bit older.

I'm naively suggesting a bump to the version of botocore, but I'm not sure how big of a lift that would be.

Let me know if I can provide any more details, happy to help however.

JackKolb-ElationHealth commented 12 months ago

Thinking this through, I think we might need a dep bump in aiobotocore, not botocore. I added a comment to a existing PR to bump the version of botocore within aiobotocore: https://github.com/aio-libs/aiobotocore/pull/1037#issuecomment-1752108437

But I think we may need a version bump here for aiobotocore once it releases.

terricain commented 11 months ago

Yeah once a aiobotocore update is out, i'll update this.

YuriyGuts commented 11 months ago

Looks like aiobotocore 2.7.0 is out, which pins botocore to botocore>=1.31.16,<1.31.65 🎉

dacevedo12 commented 11 months ago

Would it be a version bump or does it require wrapping new async codepaths?

I'd assume aiobotocore took care of that but I'm not too familiar with it

jakob-keller commented 11 months ago

Would it be a version bump or does it require wrapping new async codepaths?

I'd assume aiobotocore took care of that but I'm not too familiar with it

There were no new async codepaths, merely a version bump. That should all be taken care of in aiobotocore==2.7.0.

terricain commented 11 months ago

Sorry about the delay, v12.0.0 is out.