Skip to content

For the region AWS_CN_GLOBAL there is a discrepancy in endpoint and domain suffix #6308

@pavibhai

Description

@pavibhai

Describe the bug

I see the following discrepancy when using the SDK with respect to domain suffix for AWS_CN_GLOBAL region.

Region.AWS_CN_GLOBAL.metadata().partition().dnsSuffix() -> amazonaws.com.cn

but

S3Client.serviceMetadata().endpointFor(Region.AWS_CN_GLOBAL) -> s3.aws-cn-global.amazonaws.com

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

The suffix .cn is missing

Shouldn't the endpoint be s3.aws-cn-global.amazonaws.com.cn?

Current Behavior

S3Client.serviceMetadata().endpointFor(Region.AWS_CN_GLOBAL) -> s3.aws-cn-global.amazonaws.com

The domain suffix .cn is missing

Reproduction Steps

Generate the endpoint using the following code

S3Client.serviceMetadata().endpointFor(Region.AWS_CN_GLOBAL)

Possible Solution

This appears to be stemming from the REGEX stored in AwsCnPartitionMetadata assuming that class to be handling AWS_CN_GLOBAL

Additional Information/Context

No response

AWS Java SDK version used

2.32.4

JDK version used

17

Operating System and version

OSX 15.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions