aws_credentials_gleam

Type-safe AWS credentials management for Gleam, built on top of the robust aws_credentials Erlang library.

Note: This is an independent project that provides Gleam bindings for AWS credential management. It is not affiliated with the aws-erlang project.

Quick Start

Installation

gleam add aws_credentials_gleam

Usage

import gleam/io
import gleam/option
import gleam/string
import aws_credentials_client as aws

pub fn main() {
  // Start the credentials service
  case aws.start() {
    Ok(_) -> {
      io.println("AWS credentials service started successfully")
      
      // Get current credentials
      case aws.get_credentials() {
        Ok(option.Some(creds)) -> {
          io.println("Found AWS credentials:")
          io.println("  Access Key ID: " <> creds.access_key_id)
          io.println("  Provider: " <> creds.credential_provider)
        }
        Ok(option.None) -> io.println("No AWS credentials found")
        Error(err) -> io.println("Error: " <> string.inspect(err))
      }
    }
    Error(err) -> {
      io.println("Failed to start: " <> string.inspect(err))
    }
  }
}

Features

API

Credits

This project is built on top of the excellent aws_credentials library from the aws-erlang project. If you find this Gleam wrapper useful, please consider supporting the underlying aws-erlang project:

License

Apache 2.0

Search Document