in services/tracking-service/reactive-vertx/src/main/java/com/amazon/verticles/KinesisVerticle.java [134:159]
private KinesisAsyncClient createClient() {
ClientAsyncConfiguration clientConfiguration = ClientAsyncConfiguration.builder().build();
// Reading credentials from ENV-variables
AwsCredentialsProvider awsCredentialsProvider = DefaultCredentialsProvider.builder().build();
// Configuring Kinesis-client with configuration
String tmp = System.getenv("REGION");
Region myRegion;
if (tmp == null || tmp.trim().length() == 0) {
myRegion = Region.US_EAST_1;
LOGGER.info("Using default region");
} else {
myRegion = Region.of(tmp);
}
LOGGER.info("Deploying in Region " + myRegion.toString());
return KinesisAsyncClient.builder()
.asyncConfiguration(clientConfiguration)
.credentialsProvider(awsCredentialsProvider)
.region(myRegion)
.build();
}