presto-kinesis/src/main/java/io/prestosql/plugin/kinesis/KinesisClientManager.java/KinesisClientManager/KinesisClientManager
class KinesisClientManager:    @Inject
    public KinesisClientManager(KinesisConfig config)
    {
        if (!isNullOrEmpty(config.getAccessKey()) && !isNullOrEmpty(config.getSecretKey())) {
            BasicAWSCredentials awsCredentials = new BasicAWSCredentials(config.getAccessKey(), config.getSecretKey());
            this.client = new AmazonKinesisClient(awsCredentials);
            this.amazonS3Client = new AmazonS3Client(awsCredentials);
            this.dynamoDbClient = new AmazonDynamoDBClient(awsCredentials);
        }
        else {
            DefaultAWSCredentialsProviderChain defaultChain = new DefaultAWSCredentialsProviderChain();
            this.client = new AmazonKinesisClient(defaultChain);
            this.amazonS3Client = new AmazonS3Client(defaultChain);
            this.dynamoDbClient = new AmazonDynamoDBClient(defaultChain);
        }

        this.client.setEndpoint("kinesis." + config.getAwsRegion() + ".amazonaws.com");
        this.dynamoDbClient.setEndpoint("dynamodb." + config.getAwsRegion() + ".amazonaws.com");
    }