Getting Started
Sign up for AWS
Before you begin, you need an AWS account. Please see the [Sign Up for AWS][docs-signup] 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][docs-java-env] 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][bom] import as follows:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>bom</artifactId>
<version>2.26.12</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.26.12</version>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>s3</artifactId>
<version>2.26.12</version>
</dependency>
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:
- [aws-doc-sdk-examples] repo.
- Integration tests in this repo. They are located in the
it
directory under each service module, eg: [s3-integration-tests]
Contributors β¨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!