> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-lambda-function-resource-based-policy-is-overly-permissive.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS Lambda Function resource-based policy is overly permissive

### Synopsis

| Field               | Value                                                          |
| ------------------- | -------------------------------------------------------------- |
| Rule Type           | Detection                                                      |
| Finding Type        | AWS Lambda Function resource-based policy is overly permissive |
| Finding ID          | 60000683                                                       |
| Generates a Finding | This detection rule also generates a finding                   |
| Severity            | Medium                                                         |
| Category            | CONFIGURATION                                                  |
| Cloud Providers     | AWS                                                            |
| Platform Module     | CSPM                                                           |
| Asset Types         | LAMBDA\_FUNCTION                                               |

### Description

Overly permissive resource-based policies on AWS Lambda functions allow unauthorized access, enabling attackers to exploit the function and potentially move laterally within the AWS account. This misconfiguration exposes the function to attacks from untrusted IP addresses or compromised entities.

AWS Lambda functions rely on resource-based policies to control access. A misconfigured policy granting excessive permissions, or allowing access from any source ('\*'), creates a significant security risk. Attackers could invoke the function without authorization, potentially executing malicious code or accessing sensitive data.

The impact of this misconfiguration could range from data breaches and unauthorized access to complete account compromise. Least privilege access policies are crucial for limiting the blast radius of a compromise, ensuring that even if a function is compromised, the attacker's actions are restricted. Restricting access to only necessary principals minimizes the potential damage.

To mitigate this, implement least privilege policies for all Lambda functions. Specifically, explicitly define the allowed principals ('IAM roles' or 'users') and actions ('lambda:InvokeFunction') in the resource-based policy. Regularly review and update policies, removing unnecessary permissions and ensuring only trusted entities have access. Restrict access to specific IP addresses when feasible.

### Remediation

To modify permission from AWS Lambda Function resource-based policy

1. Sign in to the AWS console
2. Select the region, from the region drop-down, for which the alert is generated
3. Navigate to AWS Lambda Dashboard
4. Click on the 'Functions' (Left panel)
5. Select the lambda function on which the alert is generated
6. Go to Configuration tab
7. Select Permissions
8. Scroll to the 'Resource-based policy' area
9. For each policy statement, use fine-grained and restrictive permissions instead of using wildcards (Lambda:\* and Resource:\*) OR add in appropriate conditions with least privilege access.
10. Click on 'Edit' button to modify the statement
11. When you finish configuring the statement, choose 'Save'.

To remove permission from AWS Lambda Function resource-based policy

1. Sign in to the AWS console
2. Select the region, from the region drop-down, for which the alert is generated
3. Navigate to AWS Lambda Dashboard
4. Click on the 'Functions' (Left panel)
5. Select the lambda function on which the alert is generated
6. Go to Configuration tab
7. Select Permissions
8. Scroll to the 'Resource-based policy' area
9. Click on 'Delete' button to modify the statement
10. In Delete statement dialog box, click on 'Delete' button.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/aws-lambda-function-resource-based-policy-is-overly-permissive.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
