meltmedia/jgroups-aws — pull request #2 by aldrinleal (2013-01-20 11:55:51+00:00)
Title: Adding credentials_provider_class support

Hey,

First: Thanks for this one. It came handy for an Atmosphere-based Project I'm doing (https://bitbucket.org/aldrinleal/elasticbeanstalk-atmosphere-sample)

However, the way it works is not compatible with AWS Elastic Beanstalk, since it does not (yet) uses Instance Roles, but instead, map into a container-dependent fashion (for Java, it exports as System Properties)

The default way for the AWS Java SDK is:
- When empty, use DefaultAWSCredentialsProvider ctor, which does a chain (it involves System Role, Environment Variables, and others)
- If you pass a AWSCredentialsProvider, it will use it (we've made a custom one for Elastic Beanstalk Apps on our Maven Archetype)
- Otherwise, supply hard-coded BasicAWSCredentials

I've extended the AWS_PING class to support a credentials_provider_class with the default set to the DefaultAWSCredentials Provider, so when missing access/secret key, there should be no change.

(Then I'll have to patch further, in order to use AWS EB / EC2 Metadata to figure out my environment, but this is not a concern. Really)

Thank you