MCPcopy Index your code
hub / github.com/aws/aws-sdk-java-v2

github.com/aws/aws-sdk-java-v2 @2.46.21

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.46.21 ↗ · + Follow
56,539 symbols 340,723 edges 5,151 files 10,351 documented · 18%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

AWS SDK for Java 2.0

Build Status Maven codecov

All Contributors

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 Central.

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.46.21</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

Then individual modules 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.46.21</version>
</dependency>
<dependency>
  <groupId>software.amazon.awssdk</groupId>
  <artifactId>s3</artifactId>
  <version>2.46.21</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.46.21</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 the following commands.

Linux:

./mvnw clean install

# Skip tests, checkstyles, findbugs, etc for quick build
./mvnw clean install -P quick

# Build a specific service module
./mvnw clean install -pl :s3 -P quick --am

Windows:

./mvnw.cmd clean install

Sample Code

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

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:

Maintenance and Support for Java Versions

We maintain full support on Long-Term Support(LTS) releases: Java 8, Java 11, Java 17, and Java 21. Note that there may be individual features in newer releases that are not supported, because the SDK must be compatible with Java 8.

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:

  • Submit issues - this is the preferred channel to interact with our team
  • Articulate your feature request or upvote existing ones on our Issues page

Contributors ✨

Thanks goes to these wonderful people (emoji key):

sullis sullis 💻 Austin Brooks Austin Brooks 💻 Konrad `ktoso` Malawski Konrad `ktoso` Malawski 💻 Andrew Hopkins Andrew Hopkins 💻 Adam Thomas Adam Thomas 💻 Steven Swor Steven Swor 💻 Carey Burgess Carey Burgess 💻
Anuraag Agrawal Anuraag Agrawal 💻 jeffalder jeffalder 💻 Boris Boris 💻 Guillaume Corré Guillaume Corré 💻 Henri Yandell Henri Yandell 💻 Ryan Schmitt Ryan Schmitt 💻 Somaya Somaya 💻
Steven Aerts Steven Aerts 💻 Steven Wong Steven Wong 💻 Tomasz Elendt Tomasz Elendt 💻 Will Erickson Will Erickson

Extension points exported contracts — how you extend this code

SdkAutoCloseable (Interface)
An implementation of AutoCloseable that does not throw any checked exceptions. The SDK does not throw checked ex [212 …
utils/src/main/java/software/amazon/awssdk/utils/SdkAutoCloseable.java
PropertiesFactory (Interface)
A factory for producing custom properties to include in each EMF record. Implementations receive the {@link MetricCo [317 …
metric-publishers/emf-metric-logging-publisher/src/main/java/software/amazon/awssdk/metrics/publishers/emf/PropertiesFactory.java
SdkHttpClient (Interface)
Interface to take a representation of an HTTP request, make an HTTP call, and return a representation of an HTTP respons [16 …
http-client-spi/src/main/java/software/amazon/awssdk/http/SdkHttpClient.java
IamPrincipalType (Interface)
The IamPrincipalType identifies what type of entity that the IamPrincipal refers to. @see <a href="http [318 implementers]
services-custom/iam-policy-builder/src/main/java/software/amazon/awssdk/policybuilder/iam/IamPrincipalType.java
TransferListener (Interface)
The TransferListener interface may be implemented by your application in order to receive event-driven updates o [7 implementers]
services-custom/s3-transfer-manager/src/main/java/software/amazon/awssdk/transfer/s3/progress/TransferListener.java
AttributeConverterProvider (Interface)
Interface for determining the AttributeConverter to use for converting a given EnhancedType. [8 implementers]
services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/AttributeConverterProvider.java
JsonNode (Interface)
A node in a JSON document. Either a number, string, boolean, array, object or null. Also can be an embedded object, whic [7 …
core/json-utils/src/main/java/software/amazon/awssdk/protocols/jsoncore/JsonNode.java
IdentityProvider (Interface)
Interface for loading Identity that is used for authentication. Identity providers are responsible for reso [8 implementers]
core/identity-spi/src/main/java/software/amazon/awssdk/identity/spi/IdentityProvider.java

Core symbols most depended-on inside this repo

build
called by 8389
services/s3/src/main/java/software/amazon/awssdk/services/s3/S3CrtAsyncClientBuilder.java
build
called by 6333
core/sdk-core/src/main/java/software/amazon/awssdk/core/document/Document.java
get
called by 2855
services-custom/dynamodb-enhanced/src/main/java/software/amazon/awssdk/enhanced/dynamodb/document/EnhancedDocument.java
of
called by 2615
core/regions/src/main/java/software/amazon/awssdk/regions/RegionMetadata.java
build
called by 2453
utils/src/main/java/software/amazon/awssdk/utils/builder/Buildable.java
equals
called by 2431
test/test-utils/src/main/java/software/amazon/awssdk/testutils/UnorderedCollectionComparator.java
put
called by 2201
codegen/src/main/java/software/amazon/awssdk/codegen/internal/ProtocolMetadataConstants.java
add
called by 1659
codegen/src/main/java/software/amazon/awssdk/codegen/poet/PoetCollectors.java

Shape

Method 49,025
Class 6,480
Interface 817
Enum 181
Function 36

Languages

Java100%
Python1%

Modules by API surface

codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/alltypesunionstructure.java282 symbols
codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/alltypesrequest.java243 symbols
codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/alltypesresponse.java241 symbols
codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/nonautoconstructcontainers/alltypesrequest.java209 symbols
codegen/src/test/resources/software/amazon/awssdk/codegen/poet/model/nonautoconstructcontainers/alltypesresponse.java207 symbols
services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/mapper/StaticImmutableTableSchemaTest.java197 symbols
services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/mapper/StaticTableSchemaTest.java195 symbols
services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/functionaltests/AutoGeneratedTimestampExtensionTest.java195 symbols
services-custom/dynamodb-enhanced/src/test/java/software/amazon/awssdk/enhanced/dynamodb/functionaltests/models/AutogeneratedTimestampTestModels.java168 symbols
test/sdk-benchmarks/src/main/java/software/amazon/awssdk/benchmark/enhanced/dynamodb/ItemFactory.java166 symbols
codegen/src/main/java/software/amazon/awssdk/codegen/model/intermediate/Metadata.java157 symbols
codegen/src/main/java/software/amazon/awssdk/codegen/model/config/customization/CustomizationConfig.java148 symbols

For agents

$ claude mcp add aws-sdk-java-v2 \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact