1

Elsewhere in StackOverflow (link), access to AWS S3 is done like this:

AmazonS3 amazonS3 = AmazonS3Client.builder()
    .withRegion("us-east-1")
    .withCredentials(new AWSStaticCredentialsProvider(creds))
    .build();

I'd like to use this pattern for AmazonKinesisAsyncClientBuilder, but there aren't any methods to set the region, or credentials.

i.e. this cannot compile:

  AmazonKinesisAsyncClientBuilder
    .withRegion("eu-west-1")
    .withCredentials(new AWSStaticCredentialsProvider(creds))
    .build();

I'm bringing in creds from a custom file (a normal thing in AWS); does AmazonKinesisAsyncClientBuilder only work with the defaults?

Using AWS SDK for Java 2.5.1

Planning to read Kinesis via AlpakkaKinesis, but that may not be relevant.

akauppi
  • 17,018
  • 15
  • 95
  • 120

1 Answers1

2

Need to do it with

AmazonKinesisAsyncClientBuilder.standard()
  .withRegion("eu-west-1")
  .withCredentials(...)
  .build()

Unlike S3, there does not seem to be AmazonKinesisAsync.builder() so the cases vary slightly.

akauppi
  • 17,018
  • 15
  • 95
  • 120