|
2 | 2 |
|
3 | 3 | To build and run these AWS SDK for Java (v2) code examples, you need the following:
|
4 | 4 |
|
5 |
| -- [Apache Maven](https://maven.apache.org/) (>3.0) |
6 |
| -- [AWS SDK for Java](https://aws.amazon.com/sdk-for-java/) (downloaded and extracted somewhere on |
7 |
| - your machine) |
8 |
| -- **All Java (v2) examples assume that you have set up your credentials in the credentials file in the .aws folder**. For information about how to set AWS credentials and the AWS Region, see [Set up AWS credentials and Region for development](http://docs.aws.amazon.com/sdk-for-java/v2/developer-guide/setup-credentials.html) in the _AWS SDK for Java Developer Guide_. You should also set the _AWS Region_ within which the operations will be performed. If a Region is not set, the default Region used is **us-east-1**. |
| 5 | +- Local access to [this repository](https://github.com/awsdocs/aws-doc-sdk-examples) by cloning, forking, or downloading a zip file. |
| 6 | +- An installation of [Apache Maven](https://maven.apache.org/) (>3.0) |
| 7 | +- **All Java (v2) examples assume that the Java SDK can obtain AWS credentials using its default credentials provider chain**. |
| 8 | + - You can set up the [default profile](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html#file-format-profile) in the shared AWS configuration files: |
| 9 | + - with [IAM Identity Center SSO](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-temporary.html#credentials-temporary-idc) settings in `~/.aws/config` |
| 10 | + - [temporary credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-temporary.html#credentials-temporary-from-portal) in `~/.aws/credentials` |
| 11 | +- Default Region configuration. You can set this in your default profile along with settings for access to AWS credentials. If a Region is not set, the default Region used is **us-east-1**. |
9 | 12 |
|
10 |
| - After you set your AWS credentials in the credentials file located in the .aws folder, you can create a service client like this. |
11 |
| - |
12 |
| - Region region = Region.US_WEST_2; |
13 |
| - S3Client s3 = S3Client.builder() |
14 |
| - .region(region) |
15 |
| - .build(); |
16 |
| - |
17 |
| -**Note**: For more information about setting your AWS credentials, see [Supplying and retrieving AWS credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html). |
| 13 | +**Note**: For more information about configuring access to your AWS credentials, see [Supplying and retrieving AWS credentials](https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials.html). |
18 | 14 |
|
19 | 15 | ## AWS SDK for Java
|
20 | 16 |
|
21 | 17 | The **javav2** folder in this repository contains examples of complete use cases, and AWS service-based code examples.
|
22 | 18 |
|
| 19 | +Each use case example and service-based code example directory includes an Apache Maven `pom.xml` file with dependency and configuration settings for that example. |
| 20 | + |
23 | 21 | ### Use cases
|
24 | 22 |
|
25 |
| -In the **use_cases** folder, find step-by-step development tutorials that use multiple AWS services. By following these tutorials, you will gain a deeper understanding of how to create Java-based applications that use the AWS SDK for Java. Most of these AWS SDK for Java tutorials use synchronous Java clients. |
| 23 | +In the **usecases** folder, find step-by-step development tutorials that use multiple AWS services. By following these tutorials, you will gain a deeper understanding of how to create Java-based applications that use the AWS SDK for Java. Most of these AWS SDK for Java tutorials use synchronous Java clients. |
26 | 24 |
|
27 | 25 | If you are interested in using asynchronous Java service clients, see one of these tutorials:
|
28 | 26 |
|
|
0 commit comments