public static AmazonDynamoDBStreamsClient createDynamoDBStreamsClient() { BasicCredentialsProvider credentials = BasicCredentialsProvider.standard(); AmazonDynamoDBStreamsClient client = !credentials.isValid() ? null : (AmazonDynamoDBStreamsClient) AmazonDynamoDBStreamsClientBuilder.standard() .withCredentials(credentials) .withRegion("eu-west-1") .build(); return client; }
DynamoDBStreamsClientProvider(AmazonDynamoDBStreamsClient client) { this.client = client; }
public AmazonDynamoDBStreamsClient getClient() { return client; }
@Produces @Singleton public DynamoDBStreamsClientProvider getDynamoDBStreamsClientProvider() throws Exception { AmazonDynamoDBStreamsClient client = DynamoDBUtils.createDynamoDBStreamsClient(); return new DynamoDBStreamsClientProvider(client); }