Skip to content

Instantly share code, notes, and snippets.

@iDVB
Last active April 8, 2019 16:11
Show Gist options
  • Save iDVB/9cbfc38279b87ebaf72e9bf525ddcee9 to your computer and use it in GitHub Desktop.
Save iDVB/9cbfc38279b87ebaf72e9bf525ddcee9 to your computer and use it in GitHub Desktop.
Lambda Using SSM
const AWS = require('aws-sdk');
const ssm = new AWS.SSM({ apiVersion: '2014-11-06' });
exports.handler = (event, context, cb) => {
ssm
.getParameter({ Name: 'awesomeParam' })
.promise()
.then(resp => {
const value = resp.Parameter.Value;
cb(null, `Success: the param value is ${value}`);
})
.catch(err => {
cb(err, 'Error');
});
};
@simesy
Copy link

simesy commented Nov 16, 2018

thank you thank you thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment