je_load_density.utils.auth.aws_sigv4

AWS Signature Version 4 signer.

Computes the canonical request, string-to-sign, signing key, and final Authorization header for an AWS service request. Returns a copy of the headers with the signing material applied.

No third-party SDK required — pure stdlib (hashlib, hmac).

Functions

sign_aws_request(method, url, region, ...[, ...])

Return a new headers dict carrying the SigV4 Authorization header, x-amz-date, optional x-amz-security-token, and x-amz-content-sha256.

je_load_density.utils.auth.aws_sigv4.sign_aws_request(method: str, url: str, region: str, service: str, access_key: str, secret_key: str, body: bytes | str = b'', headers: Mapping[str, str] | None = None, session_token: str | None = None, now: datetime | None = None) Dict[str, str]

Return a new headers dict carrying the SigV4 Authorization header, x-amz-date, optional x-amz-security-token, and x-amz-content-sha256.