Last active
April 8, 2019 16:11
-
-
Save iDVB/9cbfc38279b87ebaf72e9bf525ddcee9 to your computer and use it in GitHub Desktop.
Lambda Using SSM
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
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'); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you thank you thank you