Skip to content
This repository was archived by the owner on Jun 4, 2026. It is now read-only.

Repository files navigation

aws_api

A gleam_http request builder for AWS service APIs, generated using aws_codegen and built on top of aws4_request.

Package VersionHex Docs

gleam add aws_api
importaws_api/dynamodbimportgleam/bit_arrayimportgleam/httpcpubfnmain(){// create a client for the AWS service, such as DynamoDBletdynamo_client=dynamodb.new(access_key_id:"AKIDEXAMPLE",secret_access_key:"wJalrXUtnFEMI/K7MDENG+bPxRfiCYEXAMPLEKEY",region:"us-east-1",)// Create the request body if necessaryletbody="{\"TableName\": \"people\",\"Key\": { \"name\": { \"S\": \"Ryan\" } } }"|>bit_array.from_string// each API endpoint is a function in the service's moduleletreq=dynamodb.get_item(dynamo_client,body)// use a gleam_http client adapter to send the requestletresp=httpc.send_bits(req)}
Ok(Response(200,[#("connection","keep-alive"),#("date","Mon, 26 Aug 2024 01:14:37 GMT",),#("server","Server"),#("content-length","48"),#("content-type","application/x-amz-json-1.0",),#("x-amzn-requestid","9UDMAF5C9T46D39RJSCHUB7IMFVV4KQNSO5AEMVJF66Q9ASUAAJG",),#("x-amz-crc32","3152510195"),],"{\"Item\":{\"name\":{\"S\":\"Ryan\"}}}",))

Project Goals

aws_api is NOT an AWS SDK for Gleam. It intends to be a base for idiomatic SDKs.

Missing features

  • other AWS partitions (gov, cn, etc.)
  • fips and dualstack endpoints
  • docs
  • tests

About

AWS request builder for Gleam

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages