Skip to content
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

add AWS_RECOMMENDED as partitional endpoint pattern #2575

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rchache
Copy link
Contributor

@rchache rchache commented Apr 1, 2025

Background

  • The two existing patterns do not match what the AWS DNS team recommends to be used for partitional service endpoints
  • This PR adds a new third type which will the be recommended flag going forward, and will match the prescribed patterns 1:1 for all partitions

Testing

  • Added a sanity test

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rchache rchache requested a review from a team as a code owner April 1, 2025 18:32
@rchache rchache requested a review from milesziemer April 1, 2025 18:32
- **Required** The pattern type to use for the partition endpoint. This value can be set to ``service_dnsSuffix`` to
use the ``https://{service}.{dnsSuffix}`` pattern or ``service_region_dnsSuffix`` to use
``https://{service}.{region}.{dnsSuffix}``.
- **Required** The pattern type to use for the partition endpoint. This value should be set to ``aws_recommended`` in almost all cases.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still require this to be set? We could default to using recommended

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I don't have a strong preference. The only thing I had in mind was that it might lead to a small bug downstream in some code that expects it to always be nonnull if we miss changing it

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah - I dont have a strong preference either. Its more explicit to require it and the documentation here and on the trait itself makes it clear what to use.

- ``service_region_dnsSuffix``: ``https://{service}.{region}.{dnsSuffix}``

The following example defines a partitional service that uses ``{service}.{dnsSuffix}``:
The following example defines a partitional service that uses AWS recommended patterns for each partition:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we provide documentation on what those are? At least for AWS partition. We provide a list of the "standard patterns" eg here: https://smithy.io/2.0/aws/aws-endpoints-region.html#aws-endpoints-standardregionalendpoints-trait

Copy link
Contributor Author

@rchache rchache Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fairly complex though, and currently only captured on an internal AWS document, which I don't think is fit for the public docs. If you think we should go the full mile and put the detailed pattern cases in the docs, we can do that though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And just adding aws partition is a little misleading since aws partition is itself nonstandard

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah thats fair - I think its reasonable to leave it unspecified here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anyone asks, we can presumably link them to the authoritative doc for clarity :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants