aws-config

Read AWS configuration in OCaml
README

Read AWS configuration as Yojson format.

(* Read ~/.aws/config *)
let config = Aws_config.read_config () in
Aws_config.(config #. "aws_secret_access_key");;
- : string option = Some "-secret access key-"

(* Respect several AWS environment variables:
   suppose `AWS_SECRET_ACCESS_KEY` = `foobar`, then *)
let config = Aws_config.read_config () in
Aws_config.(config #. "aws_secret_access_key");;
- : string option = Some "foobar"

(* Profile selection:
   suppose "region = some-city" in "my_conf", "./config", then *)
let config = Aws_config.read_file ~profile:"my_conf" "config" () in
Aws_config.(config #. "region");;
- : string option = Some "some-city" 

Related

ocaml-aws ... OCaml bindings for AWS

Install
Published
28 Apr 2022
Sources
0.0.1.tar.gz
md5=d37e3ccde64a11912f075ffb15ab2b73
sha512=d9e0eedcc8e3d14431871b059a06e314063bdd4ca1c45e7af7308588c5836e2104a3f51a8043331b24701f15ba6d80274c2d64f93be3737d41bcd983ea09ac9f
Dependencies
yojson
>= "1.6.0"
re
>= "1.7.2"
dune
>= "3.0"
ocaml
>= "4.08"
Reverse Dependencies