The Parameter Store has the ability to store three different types of data, which can then be programmatically accessed via the SSM API.
aws ssm put-parameter --name "/univrs/data/url" --type "String" --value "ardeshir.io" aws ssm put-parameter --name "/univrs/data/user" --type "SecureString" --value "ubuntu"
0> aws ssm get-parameter --name "/univrs/data/user" { "Parameter": { "Type": "SecureString", "Name": "/univrs/data/user", "Value": "AQICAHh2+A9IplQTefNHcvox10nRuvOaghThI6OpBgCnH/+Q8AHP7Rpt8/TMAFSVvaF+ekeWAAAAZDBiBgkqhkiG9w0BBwagVTBTAgEAME4GCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMUPBsqHZ1ycWfOBZPAgEQgCEVfafxR66BqOrVSI/Jglf+yRNQnO8w0EcOXYu0hkycjX4=" } } [root@univrs]:~ 0> aws ssm get-parameter --name "/univrs/data/url" { "Parameter": { "Type": "String", "Name": "/univrs/data/url", "Value": "ardeshir.io" } }
[root@univrs]:/etc/confd/conf.d 0> confd -onetime -backend ssm 2018-03-17T15:54:09Z univrs confd[4381]: INFO Backend set to ssm 2018-03-17T15:54:09Z univrs confd[4381]: INFO Starting confd 2018-03-17T15:54:09Z univrs confd[4381]: INFO Backend source(s) set to 2018-03-17T15:54:10Z univrs confd[4381]: INFO Target config /tmp/univrs.conf out of sync 2018-03-17T15:54:10Z univrs confd[4381]: INFO Target config /tmp/univrs.conf has been updated
0> cat /tmp/univrs.conf [univrs] univrs_url = ardeshir.io univrs_user = ubuntu
[root@univrs]:/etc/confd/conf.d 0> cat univrs.toml [template] src = "univrs.conf.tmpl" dest = "/tmp/univrs.conf" keys = [ "/univrs/data/url", "/univrs/data/user", ]
[root@univrs]:/etc/confd/conf.d 0> ls univrs.toml [root@univrs]:/etc/confd/conf.d 0> ls ../ conf.d templates [root@univrs]:/etc/confd/conf.d 0> cat ../templates/univrs.conf.tmpl [univrs] univrs_url = {{ getv "/univrs/data/url" }} univrs_user = {{ getv "/univrs/data/user" }}