aws-sdk-java-v2

The official AWS SDK for Java - Version 2

Github星跟蹤圖

AWS SDK for Java 2.0

Build Status Build Status
Maven
Gitter
codecov

The AWS SDK for Java 2.0 is a rewrite of 1.0 with some great new features. As with version 1.0,
it enables you to easily work with Amazon Web Services but also includes features like
non-blocking IO and pluggable HTTP implementation to further customize your applications. You can
get started in minutes using Maven or any build system that supports MavenCentral as an
artifact source.

Getting Started

Sign up for AWS

Before you begin, you need an AWS account. Please see the Sign Up for AWS section of
the developer guide for information about how to create an AWS account and retrieve your AWS
credentials.

Minimum requirements

To run the SDK you will need Java 1.8+. For more information about the requirements and optimum
settings for the SDK, please see the Installing a Java Development Environment
section of the developer guide.

Using the SDK

The recommended way to use the AWS SDK for Java in your project is to consume it from Maven.

Importing the BOM

To automatically manage module versions (currently all modules have the same version, but this may not always be the case) we recommend you use the Bill of Materials import as follows:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>software.amazon.awssdk</groupId>
      <artifactId>bom</artifactId>
      <version>2.10.56</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

Then individual models may omit the version from their dependency statement:

<dependencies>
  <dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>ec2</artifactId>
  </dependency>
  <dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>s3</artifactId>
  </dependency>
  <dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>dynamodb</artifactId>
  </dependency>
</dependencies>

Individual Services

Alternatively you can add dependencies for the specific services you use only:

<dependency>
  <groupId>software.amazon.awssdk</groupId>
  <artifactId>ec2</artifactId>
  <version>2.10.56</version>
</dependency>
<dependency>
  <groupId>software.amazon.awssdk</groupId>
  <artifactId>s3</artifactId>
  <version>2.10.56</version>
</dependency>

Whole SDK

You can import the whole SDK into your project (includes ALL services). Please note that it is recommended to only import the modules you need.

<dependency>
  <groupId>software.amazon.awssdk</groupId>
  <artifactId>aws-sdk-java</artifactId>
  <version>2.10.56</version>
</dependency>

See the Set up the AWS SDK for Java section of the developer guide for more usage information.

New Features for 2.0

  • Provides a way to plug in your own HTTP implementation.

  • Provides first class support for non-blocking IO in Async clients.

Building From Source

Once you check out the code from GitHub, you can build it using Maven.

mvn clean install

# Skip tests, checkstyles, findbugs, etc for quick build
mvn clean install -P quick

# Build a specific service module
mvn clean install -pl :s3 -P quick --am

Sample Code

You can find sample code for v2 in the following places:

Giving Feedback

We need your help in making this SDK great. Please participate in the community and contribute to this effort by submitting issues, participating in discussion forums and submitting pull requests through the following channels.

主要指標

概覽
名稱與所有者aws/aws-sdk-java-v2
主編程語言Java
編程語言Java (語言數: 8)
平台
許可證Apache License 2.0
所有者活动
創建於2017-06-23 18:56:01
推送於2025-04-25 23:31:32
最后一次提交2025-04-25 12:38:56
發布數1516
最新版本名稱2.31.30 (發布於 )
第一版名稱2.0.0-preview-1 (發布於 2017-07-06 14:51:08)
用户参与
星數2.3k
關注者數92
派生數895
提交數17.2k
已啟用問題?
問題數1885
打開的問題數357
拉請求數3257
打開的拉請求數71
關閉的拉請求數540
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?