Developer Preview: This documentation covers the AWS SDK for Python v4, which is in Developer Preview and intended for evaluation and testing only. Do not use it for production workloads. For production applications, use the AWS SDK for Python (Boto3). To understand the differences between the two SDKs, see Choosing the right AWS SDK for Python.
What is the AWS SDK for Python v4?
The AWS SDK for Python v4 is a set of Python packages for calling AWS services from your applications. It's the successor to the AWS SDK for Python (Boto3) and is in Developer Preview. Until it's generally available, use Boto3 for production workloads.
To compare the two SDKs, see Choosing the right AWS SDK for Python.
About this guide
This guide explains how to install, configure, and use the AWS SDK for Python v4.
The examples in this guide use synchronous clients unless a feature requires an asynchronous client. To compare the two client types, see Synchronous and asynchronous clients.
Key features
-
Synchronous and asynchronous clients. Every service package includes a synchronous client, such as
DynamoDBClient, and an asynchronous client, such asAsyncDynamoDBClient. -
Bidirectional streaming. Asynchronous clients for supported services, such as Amazon Transcribe Streaming, send and receive event streams concurrently over HTTP/2.
-
Modular packages. Each service client is a separate package, so you install and deploy only the dependencies that your application uses.
-
Generated types. The SDK generates each client and its data types from the service's Smithy model. Operations take keyword arguments named after the request members. Each operation returns a typed output object instead of a dictionary.
-
Configurable clients. You can set the AWS Region, credential resolver, retry behavior, plugins, and interceptors for each client. Each client resolves its endpoint locally from the service's endpoint rules. You can set a custom endpoint when you need one.
Supported services
The Developer Preview provides clients for a subset of AWS services, including Amazon S3, Amazon EC2, Amazon DynamoDB, Amazon Bedrock Runtime, Amazon Simple Queue Service (Amazon SQS), AWS Lambda, and Amazon Transcribe Streaming. It doesn't yet support every AWS service or every feature available in Boto3.
Each client is a separate package whose name begins with aws-sdk-, such as aws-sdk-dynamodb. Before you adopt the SDK, verify that the service and operations that your application requires are available. For the current client packages and their release status, see the AWS SDK for Python v4 repository
For examples that use specific AWS services, see Working with AWS services.
Get started with the SDK
To begin evaluating the AWS SDK for Python v4, use the following resources:
-
Follow Getting started with the AWS SDK for Python v4 to install the SDK, configure authentication, and run your first examples.
-
See Configuration to configure service clients for your environment.
-
Explore Using the AWS SDK for Python v4 to make requests, choose between synchronous and asynchronous clients, handle errors, and customize SDK behavior.
Additional documentation and resources
In addition to this guide, the following online resources are available to AWS SDK for Python v4 developers:
Maintenance and support for SDK major versions
For information about maintenance and support for SDK major versions and their underlying dependencies, see the following in the AWS SDKs and Tools Reference Guide: