Skip to content

Commit 0ac3949

Browse files
authored
Java V2 - Update the main README instructions for accuracy (#7573)
https://taskei.amazon.dev/tasks/V1935190391
1 parent 30af213 commit 0ac3949

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

javav2/README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,25 @@
22

33
To build and run these AWS SDK for Java (v2) code examples, you need the following:
44

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**.
912

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).
1814

1915
## AWS SDK for Java
2016

2117
The **javav2** folder in this repository contains examples of complete use cases, and AWS service-based code examples.
2218

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+
2321
### Use cases
2422

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

2725
If you are interested in using asynchronous Java service clients, see one of these tutorials:
2826

0 commit comments

Comments
 (0)