How to making async calls to Amazon Bedrock
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
With Amazon Bedrock, "async" can mean two different things, and mixing them up causes confusion. One meaning is application-level concurrency, where your program issues multiple requests without blocking its own event loop. The other is Bedrock's service-level asynchronous inference API, where you start a job, let AWS process it in the background, and later poll for completion.
Know which async model you need
If you want standard text generation requests to run concurrently inside a Python service, you can keep using the Bedrock runtime client and offload blocking SDK calls from the event loop. If you need a true background inference job with persisted output, Bedrock provides async invocation APIs such as start_async_invoke and get_async_invoke.
Those are different tools for different workloads:
- request concurrency for many normal online calls
- job-style async processing for long-running or background tasks
Application-level async with Python
The Python AWS SDK is typically synchronous, so a common pattern is to call it from worker threads while still coordinating work with asyncio.
This does not turn the AWS API itself into a magical async protocol. It simply lets your application handle multiple blocking calls concurrently.
Service-level async invocation
Bedrock also supports true asynchronous invocation for supported workloads through start_async_invoke. In that pattern, you submit the job and provide an output location, commonly in S3.
Then poll status later:
This is the right model when the output may take long enough that you do not want to hold an HTTP request open.
Choose the right pattern for the workload
Use concurrent normal calls when:
- requests are short-lived
- you need low-latency interactive responses
- your own service just needs better throughput
Use Bedrock async jobs when:
- the workload is long-running
- output should land in S3
- the caller can tolerate polling or callback-style completion handling
Trying to force every use case into one pattern usually makes the architecture worse.
In other words, the right answer depends on where you want the waiting to happen. You can hide blocking inside your application with concurrency, or you can move the whole job lifecycle into Bedrock and treat completion as a separate event.
Common Pitfalls
The biggest mistake is assuming asyncio alone makes the boto3 client non-blocking. Without wrapping the call in threads or another concurrency mechanism, the SDK call still blocks.
Another mistake is confusing concurrent online invocation with Bedrock's async job APIs. They solve different operational problems.
Developers also forget that service-level async workflows usually need S3 output configuration and job-status handling. They are not just invoke_model with a different function name.
Finally, be careful with rate limits and concurrency. Async code can increase throughput quickly, but it can also increase request pressure just as quickly.
Summary
- Bedrock async work can mean concurrent client calls or true background inference jobs.
- For normal request concurrency in Python, wrap blocking SDK calls with
asyncio.to_threador similar techniques. - For long-running supported workloads, use
start_async_invokeand laterget_async_invoke. - Pick the pattern based on latency, output handling, and operational needs.
- Async improves throughput only when the surrounding architecture handles concurrency and job tracking correctly.
Related reading
- How to manage pod scheduling in aws EKS?
- How to mock AWS DynamoDB service?
- How to modify expiry time of the access and identity tokens for AWS Cognito User Pools
- How to monitor disk usage of kubernetes persistent volumes?
- How to manage persistent connections in kubernetes
- How to manage the 5 seconds response timeout limit in Dialogflow / Api.ai?
- How to manage a mutex in an asynchronous method
- how to manage an NDC-like log4net stack with async/await methods? per-Task stack?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.