-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose Endpoints Partition DNSSuffix #2710
Comments
Potential implementation submitted: #2711 |
Thanks for creating this feature request @bflad. The DNS suffix is an internal detail of the endpoint resolver's metadata, and we've tried to only expose that data as needed. With that said, in this context, I think it makes sense for DNS suffix to be exposed. We'll review the PR and get back to you with feedback. |
Exposes the underlying partition metadata's DNSSuffix value via the `DNSSuffix` method on the endpoint's `Partition` type. This allows access to the partition's DNS suffix, e.g. "amazon.com". Fix #2710
The change looks good, thanks for taking the time to create the PR. It is merged in and will be included in the SDK's next release. |
Feature description
There does not appear to be an easy method to extract the existing
endpoints.Partition
DNSSuffix
field for the default partitions:aws-sdk-go/aws/endpoints/defaults.go
Line 82 in f0c3a48
aws-sdk-go/aws/endpoints/defaults.go
Line 3520 in f0c3a48
aws-sdk-go/aws/endpoints/defaults.go
Line 4014 in f0c3a48
This information is helpful in building AWS partition agnostic IAM policy documents (https://docs.amazonaws.cn/en_us/aws/latest/userguide/iam.html) and constructing hostnames not available in the default endpoints information such as S3 website endpoints (https://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region).
Describe alternatives you've considered
Hardcoding the DNS suffix after performing a regional lookup against AWS China:
Additional context
The text was updated successfully, but these errors were encountered: