@Override
  @CanIgnoreReturnValue
  public KmsClient withDefaultCredentials() throws GeneralSecurityException {
    try {
      return withCredentialsProvider(new DefaultAWSCredentialsProviderChain());
    } catch (AmazonServiceException e) {
      throw new GeneralSecurityException("cannot load default credentials", e);
    }
  }
Loads default AWS credentials.

<p>AWS credentials provider chain that looks for credentials in this order:

<ul>
  <li>Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_KEY
  <li>Java System Properties - aws.accessKeyId and aws.secretKey
  <li>Credential profiles file at the default location (~/.aws/credentials)
  <li>Instance profile credentials delivered through the Amazon EC2 metadata service
</ul>

@throws GeneralSecurityException if the client initialization fails
java_src/src/main/java/com/google/crypto/tink/integration/awskms/AwsKmsClient.java