The AWS SDK for Java 1.x has entered maintenance mode as of July 31, 2024,
and will reach end-of-support
Ways to get the AWS SDK for Java
Prerequisites
To use the AWS SDK for Java, you must have:
-
You must be able to sign in to the AWS access portal available in the AWS IAM Identity Center.
-
A suitable installation of Java.
-
Temporary credentials set up in your local shared
credentials
file.
See the Basic setup to work with AWS services topic for instructions on how to get set up to use the SDK for Java.
Use a build tool to manage dependencies for the SDK for Java (recommended)
We recommend using Apache Maven or Gradle with your project to access required dependencies of the SDK for Java. This section describes how to use those tools.
Download and extract the SDK (not recommended)
We recommend that you use a build tool to access the SDK for your project, You can, however, download a prebuilt jar of latest version of the SDK .
Note
For information about how to download and build previous versions of the SDK, see Installing previous versions of the SDK.
-
Download the SDK from https://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip
. -
After downloading the SDK, extract the contents into a local directory.
The SDK contains the following directories:
-
documentation
- contains the API documentation (also available on the web: AWS SDK for Java API Reference). -
lib
- contains the SDK.jar
files. -
samples
- contains working sample code that demonstrates how to use the SDK. -
third-party/lib
- contains third-party libraries that are used by the SDK, such as Apache commons logging, AspectJ and the Spring framework.
To use the SDK, add the full path to the lib
and third-party
directories to the dependencies in your build file, and add them to your java CLASSPATH
to run your code.
Build previous versions of the SDK from source (not recommended)
Only the latest version of the complete SDK is provided in pre-built form as a
downloadable jar. However, you can build a previous version of the SDK using Apache Maven
(open source). Maven will download all necessary dependencies, build and install the SDK in
one step. Visit http://maven.apache.org/
-
Go to the SDK’s GitHub page at: AWS SDK for Java (GitHub)
. -
Choose the tag corresponding to the version number of the SDK that you want. For example,
1.6.10
. -
Click the Download ZIP button to download the version of the SDK you selected.
-
Unzip the file to a directory on your development system. On many systems, you can use your graphical file manager to do this, or use the
unzip
utility in a terminal window. -
In a terminal window, navigate to the directory where you unzipped the SDK source.
-
Build and install the SDK with the following command (Maven
required): mvn clean install -Dgpg.skip=true
The resulting
.jar
file is built into thetarget
directory. -
(Optional) Build the API Reference documentation using the following command:
mvn javadoc:javadoc
The documentation is built into the
target/site/apidocs/
directory.