use of com.amazonaws.services.kinesis.AmazonKinesisAsyncClientBuilder in project hazelcast by hazelcast.
the class AwsConfig method buildClient.
public AmazonKinesisAsync buildClient() {
AmazonKinesisAsyncClientBuilder builder = AmazonKinesisAsyncClientBuilder.standard();
if (endpoint == null) {
if (region != null) {
builder.setRegion(region);
}
} else {
builder.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, region));
}
builder.withCredentials(accessKey == null ? new DefaultAWSCredentialsProviderChain() : new AWSStaticCredentialsProvider(new BasicAWSCredentials(accessKey, secretKey)));
builder.withClientConfiguration(new ClientConfiguration());
return builder.build();
}
Aggregations