awsendpoints

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: MIT Imports: 4 Imported by: 0

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

func Action(r *http.Request) string

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

func Resolve(service, region string) string

Resolve returns the real AWS hostname for a service and region, or "" if the service is not in the allowlist.

func ServiceFromAuth

func ServiceFromAuth(r *http.Request) string

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL