title: InvalidParameterValueException: The role defined for the function cannot be assumed by Lambda
body: <p>I'm using the <a href="https://aws.amazon.com/sdk-for-node-js/" rel="noreferrer">AWS SDK for JavaScript</a> and it is returning the following error when I try to create a Lambda function:</p>
  
  <blockquote>
    <p>InvalidParameterValueException: The role defined for the function cannot be assumed by Lambda.</p>
  </blockquote>
  
  <p>I've double-checked my role and it is perfectly valid. However, I'm still unable to create the Lambda function.</p>
  
  <p>My role trust relationship is:</p>
  
  <pre><code>{
      "Version": "2012-10-17",
      "Statement": [
          {
              "Effect": "Allow",
              "Principal": {
                  "Service": [
                      "lambda.amazonaws.com"
                  ]
              },
              "Action": [
                  "sts:AssumeRole"
              ]
          }
      ]
  }
  </code></pre>