Skip to content
IAM Policy Generator

IAM policy example: invoke one Lambda function, with a least privilege rewrite

Allows a principal to invoke a single Lambda function, my-function, in one Region and account. The original uses lambda:* on every function. The rewrite keeps one action and one function ARN. Resource names and account 111122223333 are placeholders used in AWS documentation.

Open the workbench ยท All examples

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "InvokeAny",
      "Effect": "Allow",
      "Action": "lambda:*",
      "Resource": "*"
    }
  ]
}

What it allows

  • Allows every Lambda action on every function in every Region.

What it allows

  1. Allow 135 actions (lambda:*) on every resource.

    Action or patternActionsAccess levels
    lambda:*135List 25, Read 32, Write 68, Permissions management 8, Tagging 2

Checks

The action lambda:* covers 135 actions, including code updates and permission changes on all functions.

Least privilege rewrite

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "InvokeOne",
      "Effect": "Allow",
      "Action": "lambda:InvokeFunction",
      "Resource": "arn:aws:lambda:us-east-1:111122223333:function:my-function"
    }
  ]
}

The rewrite grants InvokeFunction on one function ARN. Updating code and editing function permissions are removed.

What it allows

  1. Allow 1 action (lambda:InvokeFunction) on arn:aws:lambda:us-east-1:111122223333:function:my-function.

    Action or patternActionsAccess levels
    lambda:InvokeFunction1Write 1

Checks

No flags from the six checks.

Sources

  1. AWS Lambda Developer Guide: permissions, read 16 Nov 2026
  2. AWS Lambda Developer Guide: resource-based policies, read 16 Nov 2026
  3. AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026

Last reviewed 16 Nov 2026.