通过 s3 DefaultAWSCredentialsProviderChain() 管理 Ignite 集群

Manage Ignite cluster via s3 DefaultAWSCredentialsProviderChain()

是否可以使用 DefaultAWSCredentialsProviderChain 创建 s3 管理的 ignite 集群?在 java 你可以这样做:

    DefaultAWSCredentialsProviderChain chain = new DefaultAWSCredentialsProviderChain();
    AWSCredentials creds = chain.getCredentials();

我知道我可以轻松创建一个实现 AWSCredentials and uses the provider chain under the hood, like in here http://apacheignite.gridgain.org/docs/aws-config 的包装器 class。有没有办法只用 spring 来做到这一点?没有包装纸?

编辑:这可能是我要使用的内容:

import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.auth.DefaultAWSCredentialsProviderChain;

/**
 * Created by Carlos Bribiescas on 10/28/16.
 */
public class DefaultAWSCredentials implements AWSCredentials{
    private DefaultAWSCredentials() {}

    private static class LazyHolder{
        private static AWSCredentials CREDENTIALS = new DefaultAWSCredentialsProviderChain().getCredentials();
    }

    @Override
    public String getAWSAccessKeyId() {
        return LazyHolder.CREDENTIALS.getAWSAccessKeyId();
    }

    @Override
    public String getAWSSecretKey() {
        return LazyHolder.CREDENTIALS.getAWSSecretKey();
    }
}

您应该能够为此使用 Spring factory-beanfactory-method

<bean id="aws.cred.chain" class="com.amazonaws.auth.DefaultAWSCredentialsProviderChain"/>

<property name="ipFinder">
    <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">
        <property name="awsCredentials">
            <bean factory-bean="aws.cred.chain" factory-method="getCredentials"/>
        </property>
    </bean>
</property>