pavibhai commented on code in PR #1424: URL: https://github.com/apache/polaris/pull/1424#discussion_r2243653830
########## polaris-core/src/main/java/org/apache/polaris/core/storage/aws/AwsCredentialsStorageIntegration.java: ########## @@ -227,6 +261,24 @@ private String getArnPrefixFor(String roleArn) { } } + private static String getKMSArnPrefix(String roleArn) { + if (roleArn.contains("aws-cn")) { + return "arn:aws-cn:kms:"; + } else if (roleArn.contains("aws-us-gov")) { + return "arn:aws-us-gov:kms:"; + } else { + return "arn:aws:kms:"; + } + } + + private static String getS3Endpoint(String roleArn, String region) { + if (roleArn.contains("aws-cn")) { Review Comment: We could do the following instead: ```java Region regionObj = Region.of(region); String.format("s3.%s.%s", region.id(), region.metadata().partition().dnsSuffix())) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org