go-ssm-config alternatives and similar packages
Based on the "Configuration" category.
Alternatively, view go-ssm-config alternatives based on common mentions on social networks and blogs.
-
kelseyhightower/envconfig
Go library for managing configuration data from environment variables. -
konfig
Composable, observable and performant config handling for Go for the distributed processing era. -
koanf
Light weight, extensible library for reading config in Go applications. Built in support for JSON, TOML, YAML, env, command line. -
confita
Load configuration in cascade from multiple backends into a struct. -
config
JSON or YAML configuration wrapper with environment variables and flags parsing. -
cleanenv
Minimalistic configuration reader (from files, ENV, and wherever you want). -
hjson
Human JSON, a configuration file format for humans. Relaxed syntax, fewer mistakes, more comments. -
gookit/config
application config manage(load,get,set). support JSON, YAML, TOML, INI, HCL. multi file load, data override merge. -
gcfg
read INI-style configuration files into Go structs; supports user-defined types and subsections -
joshbetz/config
A small configuration library for Go that parses environment variables, JSON files, and reloads automatically on SIGHUP. -
goConfig
Parse a struct as input and populates the fields of this struct with parameters fom command line, environment variables and configuration file. -
harvester
Harvester, a easy to use static and dynamic configuration package supportig seeding, env vars and Consul integration. -
onion
Layer based configuration for Go, Supports JSON, TOML, YAML, properties, etcd, env, and encryption using PGP. -
go-aws-ssm
Go package that fetches parameters from AWS System Manager -
configuro
opinionated configuration loading & validation framework from ENV and Files focused towards 12-Factor compliant applications. -
configure
Provides configuration through multiple sources, including JSON, flags and environment variables. -
configuration
Library for initializing configuration structs from env variables, files, flags and 'default' tag. -
go-up
A simple configuration library with recursive placeholders resolution and no magic. -
hocon
Configuration library for working with the HOCON(a human-friendly JSON superset) format, supports features like environment variables, referencing other values, comments and multiple files. -
Genv
Makes it easy to read and use environment variables in your projects -
CONFLATE
Library providing routines to merge and validate JSON, YAML and/or TOML files -
sprbox
Build-environment aware toolbox factory and agnostic config parser (YAML, TOML, JSON and Environment vars). -
swap
Instantiate/configure structs recursively, based on build environment. (YAML, TOML, JSON and env). -
typenv
Minimalistic, zero dependency, typed environment variables library. -
gonfig
Tag-based configuration parser which loads values from different providers into typesafe struct. -
nasermirzaei89/env
Simple useful package for read environment variables. -
gone/jconf
Modular JSON configuration. Keep you config structs along the code they configure and delegate parsing to submodules without sacrificing full config serialization. -
txgruppi-config
Quick and easy way to load config files based on a simple set of rules.
Scout APM - Leading-edge performance monitoring starting at $39/month
Do you think we are missing an alternative of go-ssm-config or a related project?
README
ssmconfig

import "github.com/ianlopshire/go-ssm-config"
SSMConfig is a utility for loading configuration parameters from AWS SSM (Parameter Store) directly into a struct. This package is largely inspired by kelseyhightower/envconfig.
Motivation
This package was created to reduce the boilerplate code required when using Parameter Store to provide configuration to AWS Lambda functions. It should be suitable for additional applications.
Usage
Set some parameters in AWS Parameter Store:
Name | Value | Type | Key ID |
---|---|---|---|
/exmaple_service/prod/debug | false | String | - |
/exmaple_service/prod/port | 8080 | String | - |
/exmaple_service/prod/user | Ian | String | - |
/exmaple_service/prod/rate | 0.5 | String | - |
/exmaple_service/prod/secret | zOcZkAGB6aEjN7SAoVBT | SecureString | alias/aws/ssm |
Write some code:
package main
import (
"fmt"
"log"
"time"
ssmconfig "github.com/ianlopshire/go-ssm-config"
)
type Config struct {
Debug bool `ssm:"debug" default:"true"`
Port int `ssm:"port"`
User string `ssm:"user"`
Rate float32 `ssm:"rate"`
Secret string `ssm:"secret" required:"true"`
}
func main() {
var c Config
err := ssmconfig.Process("/example_service/prod/", &c)
if err != nil {
log.Fatal(err.Error())
}
format := "Debug: %v\nPort: %d\nUser: %s\nRate: %f\nSecret: %s\n"
_, err = fmt.Printf(format, c.Debug, c.Port, c.User, c.Rate, c.Secret)
if err != nil {
log.Fatal(err.Error())
}
}
Result:
Debug: false
Port: 8080
User: Ian
Rate: 0.500000
Secret: zOcZkAGB6aEjN7SAoVBT
Additional examples can be found in godoc.
Struct Tag Support
ssmconfig supports the use of struct tags to specify parameter name, default value, and required parameters.
type Config struct {
Param string `ssm:"param"`
RequiredParam string `ssm:"required_param" required:"true"`
DefaultParam string `ssm:"default_param" default:"foobar"`
}
The ssm
tag is used to lookup the parameter in Parameter Store. It is joined to the base path passed into Process()
.
If the ssm
tag is missing ssmconfig will ignore the struct field.
The default
tag is used to set the default value of a parameter. The default value will only be set if Parameter Store
returns the parameter as invalid.
The required
tag is used to mark a parameter as required. If Parameter Store returns a required parameter as invalid,
ssmconfig will return an error.
The behavior of using the default
and required
tags on the same struct field is currently undefined.
Supported Struct Field Types
ssmconfig supports these struct field types:
- string
- int, int8, int16, int32, int64
- bool
- float32, float64
More supported types may be added in the future.
Licence
MIT