AWSAuth.jl

AWSAuth.jl

The AWSAuth package implements AWS authentication. Currently this consists of AWS Signature v4 signing for HTTP requests sent to AWS.

AWS4AuthLayer{Next} <: HTTP.Layer

Abstract type used by HTTP.request to add an AWS Signature v4 authentication layer to the request.

source
HTTP.requestFunction.
HTTP.request(::Type{AWS4AuthLayer}, url::HTTP.URI, req::HTTP.Request, body) -> HTTP.Response

Perform the given request, adding a layer of AWS authentication using AWS Signature v4. An "Authorization" header to the request.

source
SignatureV4.sign!(method::String, url::HTTP.URI, headers::HTTP.Headers, body; kwargs...)

Add an "Authorization" header to headers, modifying it in place. The header contains a computed signature based on the given credentials as well as metadata about what was used to compute the signature. For more information, see the AWS documentation on the Signature v4 process.

Keyword arguments

All keyword arguments to this function are optional, as they have default values.

  • body_sha256: A precomputed SHA-256 sum of body
  • body_md5: A precomputed MD5 sum of body
  • timestamp: The timestamp used in request signing (defaults to now in UTC)
  • aws_service: The AWS service for the request (determined from the URL)
  • aws_region: The AWS region for the request (determined from the URL)
  • aws_access_key_id: AWS access key (read from the environment)
  • aws_secret_access_key: AWS secret access key (read from the environment)
  • aws_session_token: AWS session token (read from the environment, or empty)
  • token_in_signature: Use aws_session_token when computing the signature (true)
  • include_md5: Add the "Content-MD5" header to headers (true)
  • include_sha256: Add the "x-amz-content-sha256" header to headers (true)
source