> 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-nearing-availability-code-storage-limit.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# AWS Lambda nearing availability code storage limit

### Synopsis

| Field               | Value                                              |
| ------------------- | -------------------------------------------------- |
| Rule Type           | Detection                                          |
| Finding Type        | AWS Lambda nearing availability code storage limit |
| Finding ID          | 60000181                                           |
| Generates a Finding | This detection rule also generates a finding       |
| Severity            | Informational                                      |
| Category            | CONFIGURATION                                      |
| Cloud Providers     | AWS                                                |
| Platform Module     | CSPM                                               |
| Asset Types         | LAMBDA\_REGION\_SUMMARY                            |
| ATT\&CK Tactic      | TA0112 (TA0112)                                    |
| ATT\&CK Technique   | T1685 (T1685)                                      |

### Description

AWS Lambda functions approaching their code storage limit pose a significant risk of service disruption. Near-capacity conditions can lead to function deployment failures, impacting application availability and functionality.

AWS Lambda provides a default code storage limit per region. Exceeding this limit prevents deploying new function versions or updating existing ones. This misconfiguration exposes applications to outages and hinders operational agility. Untrusted actors could exploit this limitation to cause denial-of-service attacks by filling the available storage.

The impact of exceeding the Lambda code storage limit includes application downtime and potential business disruption. Maintaining sufficient storage capacity ensures smooth application operation and prevents unexpected service interruptions. Proactive management prevents operational disruptions and associated financial losses.

To mitigate this risk, regularly review Lambda function code size and remove or optimize unused functions. Implement automated monitoring and alerting to detect nearing capacity conditions. Consider using techniques like code splitting or function refactoring to reduce individual function sizes. Request a storage limit increase from AWS if necessary, to accommodate growth.

### Remediation

**Manual steps:**

Lambda Region Summary - Manual remediation steps:

1. Sign into the AWS console
2. In the console, select the specific region from region drop down on the top right corner, for which the alert is generated
3. Navigate to the AWS Lambda Dashboard
4. Click on 'Functions', choose each the lambda function
5. Either remove the function that you no longer use or deduce the code size of the function that if you do not want to remove.


---

# 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-nearing-availability-code-storage-limit.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.
