Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Migrate from version 1.x to 2.x of the AWS SDK for Java - AWS SDK for Java 2.x

Migrate from version 1.x to 2.x of the AWS SDK for Java

The AWS SDK for Java 2.x is a major rewrite of the 1.x code base built on top of Java 8+. It includes many updates, such as improved consistency, ease of use, and strongly enforced immutability. This section describes the major features that are new in version 2.x, and provides guidance on how to migrate your code to version 2.x from 1.x.

What’s new in version 2

  • You can configure your own HTTP clients. See HTTP transport configuration.

  • Async clients feature non-blocking I/O support and return CompletableFuture objects. See Asynchronous programming.

  • Operations that return multiple pages have autopaginated responses. This way, you can focus your code on what to do with the response, without the need to check for and get subsequent pages. See Pagination.

  • SDK start time performance for AWS Lambda functions is improved. See SDK start time performance improvements.

  • Version 2.x supports a new shorthand method for creating requests.

    dynamoDbClient.putItem(request -> request.tableName(TABLE))

For more details about the new features and to see specific code examples, refer to the other sections of this guide.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.