Awskit_lwt_unixLwt + Unix runtime adapter for AWS.
Ready-to-use adapter for Lwt applications on Unix. Uses Cohttp_lwt_unix.Client for HTTP — just create a connection and start making AWS calls:
let conn =
Awskit_lwt_unix.create ~region:"us-east-1" ~credentials ()
|> Result.get_ok
in
(* pass [conn] to any service package, e.g. Awskit_s3_lwt_unix *)For MirageOS or custom Lwt HTTP backends, use the generic Awskit_lwt.Make functor instead.
Connection handle. Create with create, then pass to service operations.
module Runtime :
Awskit.Runtime.S with type 'a t = 'a Lwt.t and type connection = tRuntime module satisfying Awskit.Runtime.S. The monad is Lwt.t.
module Credentials : sig ... endval create :
?ctx:Cohttp_lwt_unix.Client.ctx ->
?endpoint:string ->
?region:string ->
?credentials:Awskit.Credentials.t ->
?clock:(unit -> Ptime.t) ->
?retry_policy:Awskit.Retry.t ->
?random_float:(upper_bound:float -> float) ->
?timeout_policy:Awskit.Timeout.policy ->
?max_response_drain_bytes:int ->
?imdsv1_fallback:Credentials.imdsv1_fallback ->
unit ->
(t, Awskit.Error.t) Stdlib.resultCreate a connection to AWS.