> 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/cortex-cloud-posture-management/serverless-function-posture-security/troubleshooting-serverless-function-scanning-errors.md).

# Troubleshooting serverless function scanning errors

When a serverless function scan fails, the scanning error tells you which function failed, why it failed, and whether Cortex Cloud will retry the scan.

### What a scanning error includes

* **The name of the serverless function** that failed to scan.
* **The asset ID** of the function, so you can find it in the asset inventory.
* **A description of the failure.** When a function isn't supported, the error lists the supported deployment types.
* **A retry indication.** The error says whether Cortex Cloud will retry the scan automatically.

Errors that can't succeed on a retry, such as access-denied errors, aren't retried. Fix the cause, and then rescan the function.

#### Scanning error messages

Each scanning error message names the cloud service that returned the error. In the messages below, *service* stands for one of the following:

<table><thead><tr><th width="270.3629150390625">Cloud provider</th><th>Service</th></tr></thead><tbody><tr><td>AWS</td><td>AWS Lambda API, Amazon S3</td></tr><tr><td>Azure</td><td>Azure Resource Manager, Azure Blob Storage, Azure Files, Azure Function App deployment service (Kudu)</td></tr><tr><td>Google Cloud</td><td>Google Cloud Functions API, Google Cloud Run API, Google Cloud Storage</td></tr></tbody></table>

If the service can't be identified, the message refers to it generically as "a service".

<table><thead><tr><th width="270.2933349609375">Error type</th><th>Message</th></tr></thead><tbody><tr><td>Unauthorized</td><td><em>Service</em> denied access while scanning this function. Verify that the credentials used for scanning are valid and have read access to this function and its associated resources.</td></tr><tr><td>CertificateIssue</td><td>A secure connection to <em>service</em> could not be established because its certificate could not be verified.</td></tr><tr><td>Unreachable</td><td>The scanner could not connect to <em>service</em>, which is required to scan this function.</td></tr><tr><td>InvalidURL</td><td>An address required to scan this function is not a valid URL. If you configured a custom address, verify that it is correct and begins with https://.</td></tr><tr><td>RateLimited</td><td>The scan did not complete because <em>service</em> limited the number of requests from the scanner. This condition is typically temporary.</td></tr><tr><td>NotFound</td><td><em>Service</em> reported that this function, or a resource it depends on, was not found. It may have been deleted or moved after it was discovered.</td></tr><tr><td>UnexpectedResponse</td><td><em>Service</em> returned an unexpected response while scanning this function.</td></tr><tr><td>Timeout</td><td>The scan did not complete because it exceeded the time limit or was cancelled.</td></tr><tr><td>InternalError</td><td>This function could not be scanned due to an unexpected error.</td></tr><tr><td>FunctionNotSupported</td><td>This function cannot be scanned because its deployment type or configuration is not supported.</td></tr><tr><td>FunctionNotSupported (Azure)</td><td>This function cannot be scanned because its deployment type or configuration is not supported. Only Function Apps that run from a package in Blob Storage or from an Azure Files share are supported.</td></tr><tr><td>FunctionNotSupported (AWS)</td><td>This function cannot be scanned because its package type is Image. Only functions deployed as .zip archives are supported.</td></tr></tbody></table>

### Rescan after you fix an error

* To rescan one function, see [Rescan a serverless function](https://cortex-docs.paloaltonetworks.com/cortex-cloud-posture-management/cloud-inventory-and-environment/asset-classes/compute-assets/serverless-functions-assets.md#rescan-a-serverless-function).


---

# 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/cortex-cloud-posture-management/serverless-function-posture-security/troubleshooting-serverless-function-scanning-errors.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.
