title: How to call a list of AWS Lambda permissions for a function
body: <p>To allow a AWS service to invoke a lambda function you need to apply permissions. The <code>json</code> for this permission could look a little something like so:</p>
  
  <pre><code>{
      "FunctionName": "someFunction", 
      "StatementId": "1", 
      "Action": "lambda:InvokeFunction", 
      "Principal": "codecommit.amazonaws.com", 
      "SourceArn": "arn:aws:codecommit:us-east-1:80398EXAMPLE:MyDemoRepo", 
      "SourceAccount": "80398EXAMPLE"
  }
  </code></pre>
  
  <p>above taken from <a href="http://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify-lambda.html" rel="noreferrer">http://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify-lambda.html</a></p>
  
  <p>A permission is easy enough to add using the command line interface (cli). See <a href="http://docs.aws.amazon.com/cli/latest/reference/lambda/add-permission.html" rel="noreferrer">http://docs.aws.amazon.com/cli/latest/reference/lambda/add-permission.html</a>. And it can be removed using the command at <a href="http://docs.aws.amazon.com/cli/latest/reference/lambda/remove-permission.html" rel="noreferrer">http://docs.aws.amazon.com/cli/latest/reference/lambda/remove-permission.html</a></p>
  
  <p>What I <em>cannot</em> find is a way to list existing permissions. I've looked everywhere in the Lambda and the IAM GUI. I've looked at the list of cli commands for Lambda at <a href="http://docs.aws.amazon.com/cli/latest/reference/lambda/index.html#cli-aws-lambda" rel="noreferrer">http://docs.aws.amazon.com/cli/latest/reference/lambda/index.html#cli-aws-lambda</a> - there seems to be no command to list permissions. I also looked at the iam commands for a laugh at <a href="http://docs.aws.amazon.com/cli/latest/reference/iam/index.html#cli-aws-iam" rel="noreferrer">http://docs.aws.amazon.com/cli/latest/reference/iam/index.html#cli-aws-iam</a>. Nothing sticks out there.</p>
  
  <p>So the question : <strong>how do you get a list of Lambda permissions?</strong> What am I missing here and if it is actually impossible, why? Hopefully some AWS experts out there who can shed light on this</p>