{"id":13623249,"url":"https://github.com/vandium-io/aws-param-store","last_synced_at":"2025-04-11T21:06:53.968Z","repository":{"id":25159469,"uuid":"102145548","full_name":"vandium-io/aws-param-store","owner":"vandium-io","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-20T22:21:39.000Z","size":399,"stargazers_count":44,"open_issues_count":17,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T21:06:00.467Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vandium-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-01T19:17:41.000Z","updated_at":"2024-05-17T16:46:32.000Z","dependencies_parsed_at":"2024-01-14T06:54:07.823Z","dependency_job_id":"ad6c51cc-c7f0-4133-9de1-aadf639193f9","html_url":"https://github.com/vandium-io/aws-param-store","commit_stats":{"total_commits":53,"total_committers":4,"mean_commits":13.25,"dds":"0.13207547169811318","last_synced_commit":"00c426239376c3b0ec901e971af9fb96c601b96f"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandium-io%2Faws-param-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandium-io%2Faws-param-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandium-io%2Faws-param-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vandium-io%2Faws-param-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vandium-io","download_url":"https://codeload.github.com/vandium-io/aws-param-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248480435,"owners_count":21110937,"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-08-01T21:01:29.554Z","updated_at":"2025-04-11T21:06:53.907Z","avatar_url":"https://github.com/vandium-io.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/vandium-io/aws-param-store.svg?branch=master)](https://travis-ci.org/vandium-io/aws-param-store)\n[![npm version](https://badge.fury.io/js/aws-param-store.svg)](https://badge.fury.io/js/aws-param-store)\n\n# aws-param-store\n\nModule for loading parameter-store values from AWS SSM\n\n## Features\n* Gets parameters by name(s) or path\n* Recursively resolves paths and decodes parameters by default\n* Paginates results automatically\n* Supports both synchronous and asynchronous querying of parameters\n* Uses Promises for asynchronous calls\n* Can run inside AWS Lambda environment\n* AWS Lambda Node.js 8.10.x compatible\n* Lightweight and does not require additional dependencies other than the AWS-SDK\n\n\n## Installation\nInstall via npm.\n\n\tnpm install aws-param-store --save\n\n**Note**: `aws-param-store` does not contain a dependency on `aws-sdk` and it should be installed within your application.\n\n## Getting Started\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nawsParamStore.getParametersByPath( '/project1/service1/production' )\n    .then( (parameters) =\u003e {\n\n        // do something here\n    });\n```\n\nIf your AWS region is not set in your environment variables, then it can be set programmatically by supplying\noptions when calling `newQuery()`:\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nawsParamStore.getParametersByPath( '/project1/service1/production', { region: 'us-east-1' } )\n    .then( (parameters) =\u003e {\n\n        // do something here\n    });\n```\n\n## API\n\n### Overview\n\nMost API method calls in this library have both asynchronous and synchronous versions.\nWhen an asynchronous version is called, a Promise is returned to resolve the value\nonce the operation completes. When an `options` parameter is allowed, it can be used\nto specify specific AWS service options such as the region. All of the\n`getParameter*` methods will request that the values are decoded. If you require\nfurther control, please use the `parameterQuery()` method.\n\n### `getParameter( name [, options] )`\n\nGets a parameter by name. This method returns a promise that resolves the Parameter.\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nawsParamStore.getParameter( '/project1/my-parameter', { region: 'us-east-1' } )\n    .then( (parameter) =\u003e {\n\n        // Parameter info object for '/project1/my-parameter'\n    });\n```\n\n### `getParameterSync( name [, options] )`\n\nGets a parameter by name. This method will block until the operation completes.\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nlet parameter = awsParamStore.getParameterSync( '/project1/my-parameter',\n\t\t\t\t\t\t\t\t\t\t\t{ region: 'us-east-1' } );\n\n// Parameter info object for '/project1/my-parameter'\n```\n\n\n### `getParameters( names [, options] )`\n\nGets one or more parameters by name. This method returns a promise that resolves\nan object that contains `Parameters` and `InvalidParameters`.\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nawsParamStore.getParameters( ['/project1/my-parameter1', '/project1/my-parameter2'],\n\t\t\t\t\t\t\t { region: 'us-east-1' } )\n    .then( (results) =\u003e {\n\n        // results.Parameters will contain an array of parameters that were found\n\t\t// results.InvalidParameters will contain an array of parameters that were\n\t\t//                           not found\n    });\n```\n\n### `getParametersSync( names [, options] )`\n\nGets one or more parameters by name. This method will\nblock until the operation completes, and will return an object that contains\n`Parameters` and `InvalidParameters`.\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nlet results = awsParamStore.getParametersSync( ['/project1/my-parameter1', '/project1/my-parameter2'],\n\t\t\t\t\t\t\t     \t\t\t   { region: 'us-east-1' } );\n\n// results.Parameters will contain an array of parameters that were found\n// results.InvalidParameters will contain an array of parameters that were\n//                           not found\n```\n\n### `getParametersByPath( path [, options] )`\n\nGets parameters by recursively traversing the supplied path. This method returns\na promise that resolves the parameters that were found.\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nawsParamStore.getParametersByPath( '/project1' )\n    .then( (parameters) =\u003e {\n\n\t\t// parameters contains an array of parameter objects\n    });\n```\n\n### `getParametersByPathSync( path [, options] )`\n\nGets parameters by recursively traversing the supplied path.  This method will\nblock until the operation completes, and will return a list of matching\nparameters.\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nlet parameters = awsParamStore.getParametersByPathSync( '/project1' );\n\n// parameters contains an array of parameter objects\n```\n\n### `putParameter( name, value, type [, options] )`\n\nPuts parameter. This method returns a promise that resolves to the version returned back.\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nawsParamStore.putParameter('key', 'value1,value2', 'StringList', {region: 'us-east-1', Overwrite: false})\n    .then( (results) =\u003e {\n\n\t\t// results is the version of the value created\n    });\n```\n\n### `putParameterSync( name, value , type [, options]  )`\n\nPuts parameter. This method.  This method will block until the version returned back.\n\n```js\nconst awsParamStore = require( 'aws-param-store' );\n\nlet results = awsParamStore.putParameterSync('key', 'securedstring', 'SecureString', {region: 'us-east-1'});\n\n```\n\n### `ParameterQuery`\n\nInstances of `ParameterQuery` can be created by calling `parameterQuery( [options] )`.\nThis object is implementation behind the `getParameter*` methods, and allows further\ncontrol over how the calls are made to resolve parameters.\n\n### `ParameterQuery.path( p )`\n\nSets the path name not be queried. Returns a reference to the `ParameterQuery`\ninstance.\n\n### `ParameterQuery.named( name )`\n\nSets the name or names (if an array) to be queried. Returns a reference to the\n`ParameterQuery` instance.\n\n### `ParameterQuery.decryption( enabled = true )`\n\nIndicates that the decryption of the values is enabled/disabled. Returns a\nreference to the `ParameterQuery` instance.\n\n### `ParameterQuery.recursive( enabled = true )`\n\nEnables or disables recursive operations when resolving parameters by path.\nReturns a reference to the `ParameterQuery` instance.\n\n### `ParameterQuery.execute()`\n\nExecutes the query based on path or name(s) that were selected. Returns a Promise\nthat resolves the parameter results.\n\n### `ParameterQuery.executeSync()`\n\nExecutes the query based on path or name(s) that were selected. This operation\nwill block until complete.\n\n\n## Feedback\n\nWe'd love to get feedback on how to make this tool better. Feel free to contact\nus at `feedback@vandium.io`\n\n## License\n\n[BSD-3-Clause](https://en.wikipedia.org/wiki/BSD_licenses)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvandium-io%2Faws-param-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvandium-io%2Faws-param-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvandium-io%2Faws-param-store/lists"}