1
votes

Amazon released version 1.4.0 of their Java SDK for AWS today, with the very welcome addition com.amazonaws.regions.Region, which describes the available regions and their services.

This class also provides the createClient() factory method for all client classes (subclassing com.amazonaws.AmazonWebServiceClient).

I don't understand how I can pass a custom AWSCredentialProvider to this method, as the second expected argument is a org.apache.http.client.CredentialsProvider. I don't even understand how the method can work, because it uses Java reflection to try to find a constructor for the client classes with a org.apache.http.client.CredentialsProvider second argument, which does not exist.

It looks to me like this is a mistake in the code of the SDK, which has only be tested with the DefaultAWSCredentialsProviderChain.

Am I using this class incorrectly, or can I expect this mistake to be fixed soon ?

By the way, the lastest Javadoc does not include the com.amazonaws.regions package yet.

1

1 Answers

0
votes

glad to hear you're excited about the new Regions code. It should make working with services in different AWS regions a little easier.

You are correct that the import statement in Region.java is importing the wrong CredentialsProvider. We'll get that fixed ASAP and released in the next version of the AWS SDK for Java.

I'm pushing out a new build of the Javadoc to our site that will include the com.amazonaws.regions namespace. Look for that to be out later this afternoon.

Thanks for reporting this problem! Hope you enjoy the new regions code. Let us know if you have any other feedback, suggestions or issues. We always love hearing from customers.