User guide
AWS SDK for Java Basics
This section provides important general information about programming with the AWS SDK for Java.
Information in this section applies to all services that you might be using with the SDK for Java.
For information that is specific to a particular service (EC2, SWF, etc.), see the Using AWS Services (p.23)
section.
Topics
• Providing AWS Credentials in the AWS SDK for Java (p. 9)
• AWS Region Selection (p. 13)
• Client Networking Configuration (p. 14)
• Setting the JVM TTL for DNS Name Lookups (p. 16)
• Exception Handling (p. 17)
• Logging AWS SDK for Java Calls (p. 18)
• Access Control Policies (p. 20)
Providing AWS Credentials in the AWS SDK for
Java
To make requests to Amazon Web Services, you will need to supply AWS credentials to the SDK for
Java.There are a number of ways to do this:
• Use the default credential provider chain (recommended)
• Use a specific credential provider or provider chain (or create your own).
• Supply the credentials yourself. These can be either root account credentials, IAM credentials or
temporary credentials retrieved from AWS STS.
Important
It is strongly recommended, from a security standpoint, that you use IAM users instead of the
root account for AWS access. For more information, see IAM Best Practices in the AWS Identity
and Access Management User Guide.
This topic provides information about how to load credentials for AWS using the SDK for Java.
Version v1.0.0
9
AWS SDK for Java Developer Guide
Providing Credentials