UNPKG

aws-ssm-parameter-store

Version:

This package resolve parameters from AWS SSM Parameter Store.

74 lines (46 loc) 1.94 kB
# AWS SSM Parameter Store > ### Still in Development [Introduction](#introduction) <br /> [Installation](#installation) <br /> [Getting Started](#getting-started) <br /> [MIT License](#mit-license) <br /> **** ## [Introduction](#introduction) This module enables you to retrieve parameters in a convenient way from AWS SSM Parameter Store ## [Installation](#installation) This is done using (NPM) node package manager just copy and past in your terminal and npm will manage the rest. ```npm npm i aws-parameter-store --save ``` ## [Getting Started](#getting-started) To get started with the module, after installation just import the module and then use the destructuring construct to access the implementated method. ```js import { getParameterStore } from 'aws-ssm-parameter-store'; ``` **Map keys to parameter value** Create a key value mappings that map a given name to a value path in parameter store. ```js const mappedKeys = { dbHost: 'application/database/host', dbPassword: 'application/database/password' } ``` **Retrieve parameters from store** ```js const parameterStore = await getParameterStore(mappedKeys); ``` **Access return parameter store values** ```js console.log(parameterStore.dbHost); // Print host console.log(parameterStore.dbPasword);// Print password ``` ## [MIT License](#min-license) Copyright (c) 2018 Wycliffe Peart Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.