{"id":16260007,"url":"https://github.com/cludden/ssm-config","last_synced_at":"2025-06-14T03:05:26.450Z","repository":{"id":57102711,"uuid":"115196951","full_name":"cludden/ssm-config","owner":"cludden","description":"a AWS SSM Parameter Store configuration provider for node.js apps","archived":false,"fork":false,"pushed_at":"2018-02-26T19:54:38.000Z","size":81,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T03:04:18.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cludden.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-23T13:23:24.000Z","updated_at":"2022-02-26T15:53:49.000Z","dependencies_parsed_at":"2022-08-20T22:10:24.766Z","dependency_job_id":null,"html_url":"https://github.com/cludden/ssm-config","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/cludden/ssm-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fssm-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fssm-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fssm-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fssm-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cludden","download_url":"https://codeload.github.com/cludden/ssm-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fssm-config/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259752050,"owners_count":22905970,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T16:06:02.396Z","updated_at":"2025-06-14T03:05:26.434Z","avatar_url":"https://github.com/cludden.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssm-config\na `node.js` library for building configuration objects using parameters from AWS SSM Parameter Store. Useful for lambda functions using the `node.js` runtime.\n\n**Features**\n- supports all ssm parameter types, including encrypted parameters with type `SecureString`\n- supports custom validation/parsing allowing for defaults and type coercion\n- supports composing complex configuration using multiple ssm parameters\n\n## Installing\n```shell\n# install via NPM\n$ npm install --save @cludden/ssm-config\n```\n\n## Getting Started\nDefine some parameters in SSM:\n```shell\n$ aws ssm put-parameter --type String --name /my-app/log/level --value debug\n$ aws ssm put-parameter --type String --name /my-app/db --value {\"user\":\"foo\",\"port\":3306}\n$ aws ssm put-parameter --type SecureString --name /my-app/db/password --value s3cr3t\n$ aws ssm put-parameter --type String --name /shared/number --value 11\n```\n\nBuild a config object:\n```javascript\nimport AWS from 'aws-sdk';\nimport ssmConfig from '@cludden/ssm-config';\n\nconst prefix = '/my-app';\nconst ssm = new AWS.SSM();\n\nconst config = await ssmConfig({ prefix, ssm });\nconsole.log(config);\n/*\n{\n  db: {\n    user: \"foo\",\n    password: \"s3cr3t\",\n    port: 3306,\n  },\n  log: {\n    level: \"debug\",\n  }\n}\n*/\n```\n\nWith custom validation logic:\n```javascript\nimport AWS from 'aws-sdk';\nimport { expect } from 'chai';\nimport loadConfig from '@cludden/ssm-config';\n\nconst prefix = ['/my-app', '/shared'];\nconst ssm = new AWS.SSM();\n\nfunction validate(c) {\n    if (!Object.prototype.hasOwnProperty.call(c, 'number')) {\n        throw new Error('missing required property \"number\"');\n    }\n    c.number = parseInt(c.number, 10);\n    if (isNaN(c.number) || c.number \u003c 10) {\n        throw new Error('\"number\" must be greater than or equal to 10');\n    }\n}\n\nconst config = await loadConfig({ prefix, ssm, validate });\nconsole.log(config);\n/*\n{\n  db: {\n    user: \"foo\",\n    password: \"s3cr3t\",\n    port: 3306,\n  },\n  log: {\n    level: \"debug\",\n  },\n  number: 11,\n}\n*/\n```\n\n## Contributing\n1. Clone it (`git clone git@github.com:cludden/ssm-config.git`)\n1. Create your feature branch (`git checkout -b my-new-feature`)\n1. Commit your changes using [conventional changelog standards](https://github.com/bcoe/conventional-changelog-standard/blob/master/convention.md) (`git commit -m 'feat(my-new-feature): Add some feature'`)\n1. Push to the branch (`git push origin my-new-feature`)\n1. Ensure linting/security/tests are all passing\n1. Create new Pull Request\n\n## Testing\nPrerequisites:\n- [Docker \u0026 Compose](https://store.docker.com/search?offering=community\u0026type=edition))\n\n```shell\n# run test suite and generate code coverage\n$ docker-compose run ssm-config\n\n# run linter\n$ docker-compose run ssm-config npm run lint\n\n# run security scan\n$ docker-compose run ssm-config npm run sec\n```\n\n## License\nLicensed under the [MIT License](LICENSE.md)\n\nCopyright (c) 2017 Chris Ludden","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcludden%2Fssm-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcludden%2Fssm-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcludden%2Fssm-config/lists"}