title: How do I call an AWS_IAM authorized API Gateway endpoint from AWS Lambda who's execution role has permission to do so?
body: <p>I'm wanting to call an AWS API Gateway endpoint which has Authorization set to AWS_IAM from an executing AWS Lambda who's execution role has permission to execute that API Gateway.</p>
  
  <p><a href="https://i.stack.imgur.com/kC9vL.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kC9vL.png" alt="enter image description here"></a></p>
  
  <p><strong>Is there anyway for me to sign the HTTPS request to API Gateway using the current execution role of my Lambda?</strong></p>
  
  <p>Edit:</p>
  
  <p>Looking at <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html" rel="noreferrer">http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html</a>, I may be able to call AssumeRole using the SDK to assume the role which has permissions to execute Api Gateway, and then extract the secret key which can be used to sign the requests.</p>