Access to AWS parameter store in lambda function

I am trying to access the parameter store in AWS lambda function. This is my code as per documentation here: http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SSM.html

var ssm = new AWS.SSM({apiVersion: '2014-11-06'});
var ssm_params1 = {
    Name: 'XXXX', /* required */
    WithDecryption: true
};

ssm.getParameter(ssm_params1, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     clientId = data.value;
});

After execution, I get an error message:

"TypeError: ssm.getParameter is not a function"

Has the Amazon changed this without changing documents? Has this function moved to another type of object?

+4
source share
3 answers

, Amazon, , getParameter() getParameter (s)(). . , , .

+2

, SDK. , Amazon getParameter getParameters. , getParameter getParametersByPath - . SDK .

+3

getParameter getParameters, .

, , "apiVersion:" 2014-11-06 " SSM.

- apiVersion . .

0

Source: https://habr.com/ru/post/1681477/


All Articles