package awsm
Not available on OCaml 5.5Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=db5777910e155df33255f50c50daa046
sha512=18775715f99f5ba56c6dee40d7b4c4ab7f5d583327d2cc5c50d0cdae4c76c7b510e0ff974577cc0a9d82f497b979daf8af14f9e5741e9fbc5c83aa5928039c6b
Description
Added to opam-repository:
README
awsm - OCaml AWS client
Pure OCaml client for AWS. Code is auto-generated for all services based on the API declared in botocore. Higher level functions are often implemented on top of this base, e.g. to support multi-part uploads to S3. Sub-libraries are provided for blocking, Async, and Lwt versions of all code.
Table of Contents
Features
Services | unix package | async package | lwt package |
|---|---|---|---|
No | Yes | No | |
No | Yes | No | |
No | Yes | No | |
No | Yes | No | |
No | Yes | No | |
No | Yes | No | |
No | Yes | No | |
No | Yes | No | |
Cognito SRP | No | Yes | No |
Amazon STS (doc) | No | Yes | No |
Getting started
Install and build with local OPAM switch and lock file
Run the following commands to install a local OPAM switch based on OCaml 4.11.2 and install all package dependencies via OPAM. (Note that after running make we must also configure the local OPAM environment.)
make install-deps
eval $(opam env)To actually build the project you are advised to lift system restrictions on stack size, because otherwise some files will fail to build due to stack overflows. On a modern Linux system you can wrap the invocation of make under prlimit:
prlimit --stack=unlimited makeExamples
Here is a short example where we use the S3 API to list the objects of the provided bucket (see amazon API).
open Awsm_async
open! Import
open IO
module S3 = Awsm_s3.Make (IO) (Http)
let pr = Caml.print_endline
let suite_main bucket () =
Cfg.get () >>= fun cfg ->
S3.listBuckets cfg >>= fun _ ->
S3.listObjects cfg (S3.ListObjectsRequest.make ~bucket ()) >>= function
| #S3.listObjects_error -> failwith "list objects error"
| `Ok response ->
Option.iter response.S3.ListObjectsOutput.name ~f:pr ;
let contents =
Option.value ~default:[] response.S3.ListObjectsOutput.contents
in
let on_object oo = Option.iter (oo.S3.Object.key :> string option) ~f:pr in
List.iter contents ~f:on_object ;
return ()
let suite_command =
Command.async_spec ~summary:"Test script"
Command.Spec.(empty +> anon ("bucket" %: string))
suite_main
let () =
Command.group ~summary:"Awsm test app" [("test-suite", suite_command)]
|> Command.runMore examples are available in the app directory.
Documentation
The documentation is available on https://opensource.solvuu.com/docs/awsm/api
To generate the awsm API documentation locally you need odoc: opam install odoc.
Then run make doc.
License
Awsm is released under the ISC license.
How to contribute
See CONTRIBUTING for how to help out.
Dependencies (7)
Dev Dependencies (1)
-
odoc
with-doc
Used by (2)
Conflicts
None
Build status
Results of building awsm with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.
Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.
| Version | OCaml 4.11 | OCaml 4.14 | OCaml 5.2 | OCaml 5.4 | OCaml 5.5 |
|---|---|---|---|---|---|
| 0.1.0 (this version) | good | good | n/a | n/a | n/a |
- good Package successfully built
- partial One of the dependencies failed to build
- bad Package failed to build
- n/a Package is not available in this environment
- internal Internal failure