package br.com.ingenieux.cloudy.awseb.di;
import com.amazonaws.auth.AWSCredentialsProvider;
import com.amazonaws.auth.AWSCredentialsProviderChain;
import com.amazonaws.auth.EnvironmentVariableCredentialsProvider;
import com.amazonaws.auth.InstanceProfileCredentialsProvider;
import com.amazonaws.auth.SystemPropertiesCredentialsProvider;
/**
* <p> Elastic Beanstalk Propagates the AWS Credentials in a Way that is not supported by the AWS
* SDK </p>
*
* <p> We also love having aws.properties for local usage. </p>
*
* <p> So here's a midterm: Combining AWS Credentials Provider Chain with whatever elastic beanstalk
* needs </p>
*/
public class BeanstalkerCredentialsProviderChain extends
AWSCredentialsProviderChain {
public BeanstalkerCredentialsProviderChain() {
super(new InstanceProfileCredentialsProvider(),
new EnvironmentVariableCredentialsProvider(),
new SystemPropertiesCredentialsProvider()
);
}
public BeanstalkerCredentialsProviderChain(
AWSCredentialsProvider... credentialsProviders) {
super(credentialsProviders);
}
}