Allows loading ssm parameters via convict
npm install ssm-params-convict-adapter





![npm]()
![node version]()




![License]()

```
npm i --save ssm-params-convict-adapter
``
npm i -D aws-sdk convict
that eaccepts an object with two values the path and whether it should be strict when requesting the value (error in absence of a value).Example schema:
`js
const schema = {
auth: {
default: true,
doc: 'Whether authentication is required',
env: 'TESTDB_AUTH',
format: Boolean,
},
password: {
default: '',
doc: 'The example testdb password',
env: 'TESTDB_PASS',
format: String,
ssmParameter: {
path: '/testdb/db/password',
strict: false,
},
},
username: {
default: '',
doc: 'The example testdb username',
env: 'TESTDB_USER',
format: String,
ssmParameter: {
path: '/testdb/db/username',
strict: true,
},
},
};
export default schema;
`Usage
Example usage:
`js
import * as logger from 'winston';
import SSMParamsConvictAdapter from 'ssm-params-convict-adapter';
import schema from './schema';(async () => {
try {
const config = await SSMParamsConvictAdapter.convict(schema);
logger.info(JSON.stringify(config.getProperties()));
} catch (e) {
logger.log('error', e);
}
})();
``