Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save takahirohonda/243271461cdc06c6833060576a1fee90 to your computer and use it in GitHub Desktop.
Save takahirohonda/243271461cdc06c6833060576a1fee90 to your computer and use it in GitHub Desktop.
node-module-to-retrieve-multiple-parameters-from-aws-parameter-store-3.js
'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