feat(aws): resolve endpoints by service - #415
Open
aryasaatvik wants to merge 2 commits into
Open
Conversation
aryasaatvik
force-pushed
the
feat/aws-service-endpoints-upstream
branch
from
August 4, 2026 20:22
f25e582 to
df5b912
Compare
Add `ServiceEndpoint`, a resolver keyed by the SDK service ID exactly as it appears in the model's `aws.api#service` trait (`"S3"`, `"SESv2"`, `"S3 Control"`), and `Endpoint.resolve(service)` which layers it under the existing `Endpoint` override: 1. an explicit operation-scoped `Endpoint` wins, 2. then the `ServiceEndpoint` resolver, 3. otherwise `undefined`, leaving the generated Smithy endpoint rules to select the AWS endpoint as before. `protocol.ts` and `presign.ts` now go through `Endpoint.resolve` instead of reading `Endpoint` directly, so a process-wide per-service policy (local emulator, private endpoints) applies without every call site providing an `Endpoint`. The key is the SDK service ID rather than the SigV4 signing name because signing names collide (SES and SESv2 both sign as `ses`); SDK IDs keep every service independently routable, and they are the identifier AWS's own service-specific endpoint configuration (`AWS_ENDPOINT_URL_<SERVICE>`, `~/.aws/config` `services` sections) is derived from.
aryasaatvik
force-pushed
the
feat/aws-service-endpoints-upstream
branch
from
August 24, 2026 10:42
df5b912 to
12c84d3
Compare
aryasaatvik
added a commit
to aryasaatvik/alchemy
that referenced
this pull request
Aug 24, 2026
Pin the exact reviewed head of Distilled alchemy-run#415 before introducing Alchemy's service-routed endpoint consumer. Upstream-PR: alchemy-run/distilled#415 Upstream-Head: 12c84d36ba8390127464d9a44b80de272c79bcf4 Overlay-Reason: immutable cross-repository verification dependency
aryasaatvik
added a commit
to aryasaatvik/alchemy
that referenced
this pull request
Aug 24, 2026
Accept service-specific emulator endpoints throughout the AWS provider environment and dispatch each Distilled operation to its configured service URL. Original-Commit: ea2223042 Dependency-PR: alchemy-run/distilled#415 Dependency-Head: 12c84d36ba8390127464d9a44b80de272c79bcf4 Upstream-Candidate: AWS service endpoints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Route individual AWS SDK services to distinct endpoints while preserving the existing operation-scoped
Endpointoverride and generated Smithy endpoint fallback.API
The resolver receives the model's SDK service ID, so services that share a SigV4 name, such as
SESandSESv2, remain independently routable.Resolution order
EndpointServiceEndpointThe same resolution path is used by generated operations and S3 presigning.
Validation
mise exec bun@1.3.13 -- bun test packages/aws/test/endpoint.test.ts— 7 passing testsoxfmt --checkon the four changed files