AWS Signature V4 client-side request signing.
Signs outgoing HTTP requests with the standard AWS SigV4 algorithm. This is the client-side counterpart to the server's SigV4 verification.
Summary
Functions
Generates a presigned URL for the given parameters.
Signs an HTTP request and returns the headers to add.
Functions
Generates a presigned URL for the given parameters.
Parameters
method- HTTP methodurl- Base URL (without query params)opts- Options::access_key_id- required:secret_access_key- required:region- default "us-east-1":expires- seconds until expiry (default 3600):now- override time for testing
@spec sign_headers( String.t(), String.t(), [{String.t(), String.t()}], binary(), keyword() ) :: [ {String.t(), String.t()} ]
Signs an HTTP request and returns the headers to add.
Parameters
method- HTTP method (e.g., "GET", "PUT")url- Full URL stringheaders- Existing headers as a keyword list or mapbody- Request body (binary or "" for GET)opts- Options::access_key_id- AWS access key ID (required):secret_access_key- AWS secret access key (required):region- AWS region (default: "us-east-1"):service- AWS service name (default: "s3"):now- Override current time (for testing)
Returns
A list of header tuples to merge into the request.