Signing configuration (signingDate and clockSkewSecs are managed internally)
Sign a request with the current configuration and accumulated clock skew.
The request to sign
Signed request with Authorization and x-amz-* headers populated
Generate a presigned URL for a request.
The request to presign
Optionaloptions: PresignOptionsPresigning options (expiry, extra params)
Presigned URL string with query-string auth params
Sign an S3 POST policy for browser-based uploads.
The POST policy (expiration + conditions)
Form fields to include in the multipart POST
Initialize state for a chunked/streaming upload.
The base request (body will be replaced with chunks)
An object containing signedRequest (the seed request with chunked headers)
and state (the initial chunked signing state for subsequent signChunk calls).
Update the clock skew correction based on a server response. Call this whenever you receive a clock skew error.
Check if a response is a clock skew error and auto-correct. Returns true if the skew was detected and updated (caller should retry).
Stateful SigV4 signer with credential caching and automatic clock skew correction. Convenience wrapper around the stateless functions.
Example