diff --git a/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisTransformRegistrar.java b/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisTransformRegistrar.java index 944aa7d7a20..0908071646a 100644 --- a/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisTransformRegistrar.java +++ b/sdks/java/io/amazon-web-services2/src/main/java/org/apache/beam/sdk/io/aws2/kinesis/KinesisTransformRegistrar.java @@ -120,7 +120,7 @@ public PTransform, KinesisIO.Write.Result> buildExternal( .withClientConfiguration( ClientConfiguration.builder() .credentialsProvider(provider) - .region(Regions.fromName(configuration.region)) + .region(Region.of(configuration.region)) .endpoint(endpoint) .build()) .withPartitioner(p -> configuration.partitionKey) @@ -230,7 +230,7 @@ public PTransform> buildExternal( .withClientConfiguration( ClientConfiguration.builder() .credentialsProvider(provider) - .region(Regions.fromName(configuration.region)) + .region(Region.of(configuration.region)) .endpoint(endpoint) .build());