Created
August 19, 2019 12:40
-
-
Save takahirohonda/243271461cdc06c6833060576a1fee90 to your computer and use it in GitHub Desktop.
node-module-to-retrieve-multiple-parameters-from-aws-parameter-store-3.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const getParameter = (parameterName, ssm) => { | |
const value = ssm.getParameter({'Name': parameterName, WithDecryption: true}).promise(); | |
return value.then( (data) =>{ | |
return data.Parameter.Value; | |
}) | |
.catch((err) => { | |
return err; | |
}); | |
}; | |
module.exports = { getParameter }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment