Skip to main content

Module canonical

Module canonical 

Source
Expand description

Canonical request construction for AWS Signature Version 4.

This module implements the canonical request format as specified by AWS:

HTTPRequestMethod\n
CanonicalURI\n
CanonicalQueryString\n
CanonicalHeaders\n\n
SignedHeaders\n
HashedPayload

Each component is normalized according to the AWS specification to ensure deterministic signature computation.

Functionsยง

build_canonical_headers
Build the canonical headers string from the request headers.
build_canonical_query_string
Build the canonical query string by sorting parameters.
build_canonical_request
Build the full canonical request string from its components.
build_canonical_uri
Build the canonical URI by URI-encoding each path segment individually.
build_signed_headers_string
Build the signed headers string as a semicolon-separated list of lowercase header names.