The AWS SDK for Python v4 is now available in developer preview. It provides typed, modular clients for a growing list of AWS services, including Amazon Simple Storage Service (Amazon S3), Amazon DynamoDB, AWS Lambda, and Amazon Bedrock. Clients are available in synchronous and asynchronous (async) versions. Some features, such as event streaming, are currently available on async clients only.
We designed v4 as a new SDK around three primary goals: native async support, accurate type hints, and modular installs that include only the services you use. Because v4 is in developer preview, we recommend that you continue to use AWS SDK for Python (Boto3) for production workloads. We’re releasing v4 early so your feedback can shape it before general availability (GA).
In this post, you’ll make your first call with the AWS SDK for Python v4, see what’s included in the developer preview, and learn what’s coming next.
Make your first call
Before you begin, make sure that you have the following:
- Python 3.12 or later
- An AWS account
- AWS credentials and an AWS Region configured
The SDK reads credentials and the Region from sources such as environment variables and your shared ~/.aws/config and ~/.aws/credentials files. For supported sources, see Credential providers on the Developer Guide.
Each AWS service ships as its own package. To find a service’s package name, see Available Clients.
The following command installs the Amazon S3 client:
python -m pip install aws-sdk-s3 If you use uv, run one of the following commands instead:
# In a uv project uv add aws-sdk-s3 # In a virtual environment created with uv venv uv pip install aws-sdk-s3 Make a synchronous call
To make a synchronous call, create a client and call an operation.
The following example lists up to 10 of your S3 buckets whose names start with logs:
from aws_sdk_s3 import S3Client with S3Client() as s3: response = s3.list_buckets(max_buckets=10, prefix="logs") for bucket in response.buckets or []: print(bucket.name) The client is a context manager, so it closes its HTTP connections when the with block exits. Operation parameters are typed keyword arguments. Your editor can autocomplete them, and your type checker can catch errors before you run your code.
If you’d rather build requests ahead of time, operations also accept a dictionary or a typed model object, such as ListBucketsInput:
from aws_sdk_s3.models import ListBucketsInput s3.list_buckets({"prefix": "logs"}) s3.list_buckets(ListBucketsInput(prefix="logs")) To set the Region or profile in code, create a configuration with S3Config.resolve and pass it to the client:
from aws_sdk_s3 import S3Client, S3Config config = S3Config.resolve(region="us-west-2", profile="dev") with S3Client(config) as s3: ... Use the async client
To make async calls, use AsyncS3Client. It ships in the same aws-sdk-s3 package, so there’s nothing else to install.
Open the client with async with, and await each call. Calls are coroutines, so you can run many at once without threads. Like the synchronous client, you can set the Region or profile in code. You can set the configuration using await AsyncS3Config.resolve.
The following example configures a client and uploads 10 objects concurrently:
import asyncio from aws_sdk_s3 import AsyncS3Client, AsyncS3Config async def main(): config = await AsyncS3Config.resolve(region="us-west-2") async with AsyncS3Client(config) as s3: await asyncio.gather( *( s3.put_object( bucket="amzn-s3-demo-bucket", key=f"report-{i}.txt", body=b"Hello from Python!", ) for i in range(10) ) ) asyncio.run(main()) Stream responses from Amazon Bedrock
Async clients also support event streams, so you can process a response as it arrives. After you install aws-sdk-bedrock-runtime, the following example streams a response from Claude Haiku 5.5:
import asyncio from aws_sdk_bedrock_runtime import AsyncBedrockRuntimeClient from aws_sdk_bedrock_runtime.models import ( ContentBlockDeltaText, ConverseStreamOutputContentBlockDelta, ) async def main(): async with AsyncBedrockRuntimeClient() as bedrock: stream = await bedrock.converse_stream( model_id="global.anthropic.claude-haiku-5-5", messages=[ { "role": "user", "content": [{"text": "Explain asyncio in two sentences."}], } ], ) async with stream: async for event in stream.output_stream: if isinstance(event, ConverseStreamOutputContentBlockDelta): delta = event.value.delta if isinstance(delta, ContentBlockDeltaText): print(delta.value, end="", flush=True) asyncio.run(main()) What’s in the developer preview
Along with synchronous and async clients, the developer preview includes the following:
- Modular packages. Install only the services you use. If you use several services, the
aws-sdk-pythonpackage installs compatible client versions together. For example,aws-sdk-python[s3,dynamodb]installs the Amazon S3 and Amazon DynamoDB clients. - Types generated from AWS models. Clients, inputs, outputs, and errors carry type annotations generated from each service’s model, so they match the service API.
- Credentials and configuration. Without extra packages, the SDK reads AWS access keys from environment variables or the shared config and credentials files, and supports credential processes. For other sources, install the matching package:
aws-credentials-httpfor container credentialsaws-credentials-imdsfor Amazon Elastic Compute Cloud (Amazon EC2) instance metadataaws-credentials-stsfor AWS Security Token Service (AWS STS) assume role and web identity tokens
The SDK uses installed packages automatically, with no code changes.
For more configuration options, see Configuration in the AWS SDK for Python v4 Developer Guide. - Endpoint resolution. Every client resolves endpoints from its service’s endpoint rules, including FIPS and dual-stack endpoints. You can also send requests to a custom endpoint with the
AWS_ENDPOINT_URLor service-specificAWS_ENDPOINT_URL_<SERVICE>environment variable. - Event streaming. Event stream operations, such as
ConverseStreamin Amazon Bedrock, are currently available on async clients only. Bidirectional streams, such as those in Amazon Bedrock and Amazon Transcribe streaming, requires the AWS Common Runtime (CRT) HTTP client, which uses HTTP/2. To set it up:- Add
awscrtto your client package, for exampleaws-sdk-bedrock-runtime[awscrt]. - Import
AWSCRTHTTPClientfromsmithy_http.aio.crt, and passtransport=AWSCRTHTTPClient()to your client’s config.
- Add
- Amazon S3 support. The S3 client supports virtual-hosted and path-style addressing, streaming uploads and downloads, and flexible checksums. The SDK computes cyclic redundancy check (CRC) algorithms that the Python standard library doesn’t include, such as CRC32C and CRC64NVME, with native code for speed. It falls back to pure Python on platforms without a prebuilt wheel.
We’re adding new service clients on a regular basis. For the current list, see Available Clients.
What’s coming next
The developer preview is for evaluation and testing. APIs might change before GA, so pin your package versions and don’t use the preview for production workloads yet. On the road to GA, we’re working on the following:
- Support for additional services
- Additional credential providers, such as AWS IAM Identity Center and AWS Management Console sign-in credentials
- Amazon S3 Transfer Manager, for high-level, high-throughput uploads and downloads
- Expanded use of native code in compute-intensive parts of the SDK
- Paginators and waiters
Your feedback helps us decide what comes first.
Conclusion
The developer preview brings native async support, accurate type hints, and modular installs to the services you use today. Try it with your own workloads in a test environment. To learn more, see the following resources:
- AWS SDK for Python v4 Developer Guide
- AWS SDK for Python v4 API Reference
- AWS SDK for Python on GitHub
We want to hear from you. If something doesn’t work the way you expect, or a feature you need is missing, open an issue on GitHub. To share feedback or ask questions about the developer preview, start a discussion.

