Loads parameters from aws parameter store to a json object
npm install aws-parameters-storePackage for loading parameter-store values by path from AWS SSM into a JSON object
npm install --save aws-parameters-storejs
const paramStore = require( 'aws-parameters-store' );paramStore.getParams('/hello-world/config1/', { region: 'us-east-1' })
.then( (parameters) => {
// do something here
});
`
$3
`ts
import getParams from 'aws-parameters-store';getParams('/hello-world/config1/', { region: 'us-east-1' })
.then( (parameters) => {
// do something here
});
`API
$3
API calls return a promise
By default, JSON parameters are being evaluated$3
`ts
import getParams from 'aws-parameters-store';getParams('/hello-world/config1/', { region: 'us-east-1' })
.then( (parameters) => {
/* parameters = {
feature: {
authorization: true,
authentication: false
},
deployment: {
color: "blue"
}
version: "beta-27ea91f",
tags: ["pre-production", "beta", "rc2"]
}
*/
.catch( (error) => console.log(error));
});
``See the LICENSE file for license rights and limitations (Apache License, Version 2.0)