title: Functions of sagemaker service from js-sdk not recognize by AWS Lambda
body: <p>I'm writing a lambda (in node.js 6.10) to update an endpoint SageMaker. To do so I have to create a new HyperParamterTuningJob (and then describe it).
  I succeeded to call all functions of the service SageMaker from the sdk (like listModels, createTrainingJob, ...) (<a href="https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SageMaker.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SageMaker.html</a>) except some of them.</p>
  
  <p>All the functions that are related to HyperParameterTuningJob 
  (createHyperParameterTuningJob, describeHyperParameterTuningJob, listHyperParameterTuningJobs and stopHyperParameterTuningJob) 
  are not known in the sdk by the lambda.</p>
  
  <p>I have attached the policy 'AmazonSageMakerFullAccess' to the role IAM used (where all these functions are allowed). So the error can't come from a problem of authorization.</p>
  
  <p>I have already created a HyperParameterTuningJob (by the interface of AWS) called 'myTuningJob'.
  I have an error everytime I use the function describeHyperParamterTuningJob.
  Here is my lambda code : </p>
  
  <pre><code>const AWS = require('aws-sdk');
  const sagemaker = new AWS.SageMaker({region: 'eu-west-1', apiVersion: '2017-07-24'});
  var role = 'arn:aws:iam::xxxxxxxxxxxx:role/service-role/AmazonSageMaker-ExecutionRole-xxxxxxxxxxxxxxx';
  
  exports.handler = (event, context, callback) =&gt; {
      var params = {
          HyperParameterTuningJobName: 'myTuningJob'
      };
  
      sagemaker.describeHyperParameterTuningJob(params, function(err, data) {
          if (err) console.log(err, err.stack);
          else console.log(data);
      });
  };
  </code></pre>
  
  <p>When I try to test this code in AWS lambda, it returns this result in the console :</p>
  
  <pre><code>Function Logs:
  START RequestId: 6e79aaa4-9a18-11e8-8dcd-d58423b413c1 Version: $LATEST
  2018-08-07T08:03:56.336Z    6e79aaa4-9a18-11e8-8dcd-d58423b413c1    TypeError: sagemaker.describeHyperParameterTuningJob is not a function
  at exports.handler (/var/task/index.js:10:15)
  END RequestId: 6e79aaa4-9a18-11e8-8dcd-d58423b413c1
  REPORT RequestId: 6e79aaa4-9a18-11e8-8dcd-d58423b413c1  Duration: 50.00 ms   
  Billed Duration: 100 ms Memory Size: 128 MB Max Memory Used: 32 MB  
  RequestId: 6e79aaa4-9a18-11e8-8dcd-d58423b413c1 Process exited before completing request
  </code></pre>
  
  <p>When I call all other functions of the SageMaker service from the sdk, it runs correctly, whitout any error.</p>
  
  <p>I don't find any explanation in the documentation of why these functions related to HyperParameterTuningJob are not recognized as functions in the sdk.</p>
  
  <p>Does anyone have any idea of why it doesn't work ? Or any solutions to call theses functions ?</p>