Documentation
¶
Overview ¶
Package awsendpoints resolves AWS service names to their real public hostnames and extracts service/action identifiers from incoming AWS SDK requests.
The endpoint table is intentionally hand-curated rather than derived from the AWS SDK's endpoint-resolver data: AWS hostnames are not strictly uniform (SES → email.<region>, Cognito user pools → cognito-idp, IAM/Route53/ CloudFront are global), so a small allowlist gives fail-closed behavior for services we have not deliberately added.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Action ¶
Action extracts the AWS action name from the request. JSON-RPC services carry it in the X-Amz-Target header (e.g. "DynamoDB_20120810.GetItem"), query-based services carry it in the Action query parameter.
func Override ¶
func Override(service, hostPattern string) func()
Override swaps the endpoint pattern for a single service and returns a cleanup function that restores the previous value (or removes the entry if the service was not previously known). Intended for tests that point the recorder/contract proxy at a httptest.Server.
func Resolve ¶
Resolve returns the real AWS hostname for a service and region, or "" if the service is not in the allowlist.
func ServiceFromAuth ¶
ServiceFromAuth extracts the AWS service from the SigV4 Authorization header credential scope: Credential=AKID/date/region/SERVICE/aws4_request. Returns "" if the header is missing or unparseable.
Types ¶
This section is empty.