Awskit_lwt.MakeCreate a Lwt runtime adapter from a Cohttp client module.
Connection handle. Create with create.
module Runtime :
Awskit.Runtime.S with type 'a t = 'a Lwt.t and type connection = ttype 'a t = 'a Lwt.t.
val create :
?ctx:Client.ctx ->
?endpoint:string ->
region:string ->
credentials:Awskit.Credentials.t ->
clock:(unit -> Ptime.t) ->
?retry_policy:Awskit.Retry.t ->
?sleep:(Ptime.Span.t -> unit Lwt.t) ->
?random_float:(upper_bound:float -> float) ->
?timeout_policy:Awskit.Timeout.policy ->
?max_response_drain_bytes:int ->
unit ->
(t, Awskit.Error.t) Stdlib.resultendpoint overrides the default AWS HTTPS endpoint for local test services or custom service endpoints. region and endpoint are parsed and validated when the connection is created; validation failures are returned as structured Awskit.Error.t values. Invalid max_response_drain_bytes values are also returned as structured validation errors. retry_policy defaults to Awskit.Retry.default. When retries are enabled, custom Lwt backends must provide both sleep and random_float; use Awskit.Retry.disabled for deterministic runtimes without real delay/random capabilities. timeout_policy defaults to Awskit.Timeout.default when sleep is supplied and to Awskit.Timeout.disabled otherwise. Passing an explicit timeout policy with configured spans requires sleep, which this generic runtime uses as its timeout clock. max_response_drain_bytes defaults to 64 MiB. If a response consumer succeeds but the remaining body exceeds this drain limit, the operation fails with a body-limit error. If the consumer fails, the consumer error is returned. Response body read timeouts invalidate the reader; native Lwt.Canceled from user callbacks and body reads is preserved. operation timeouts in timeout_policy apply to one runtime transport operation; service-level retries get a fresh operation timer for each attempt.
val create_with_credentials_provider :
?ctx:Client.ctx ->
?endpoint:string ->
region:string ->
credentials_provider:Credentials.Provider.t ->
clock:(unit -> Ptime.t) ->
?retry_policy:Awskit.Retry.t ->
?sleep:(Ptime.Span.t -> unit Lwt.t) ->
?random_float:(upper_bound:float -> float) ->
?timeout_policy:Awskit.Timeout.policy ->
?max_response_drain_bytes:int ->
unit ->
(t, Awskit.Error.t) Stdlib.resultLike create, but resolves credentials through a provider for each signed request. Use this for refreshable credential sources, including provider chains that may return Unavailable, Invalid, or Failed.