# Run Lambda functions

{% hint style="info" %}
This page was generated from content adapted from the [AWS Developer Guide](https://github.com/awsdocs/aws-iot-greengrass-v2-developer-guide.git)
{% endhint %}

## Import a Lambda function as a component (console)

* **Note**\
  You can also specify custom platform attributes when you deploy the Greengrass nucleus component to a core device. For more information, see the [platform overrides parameter](https://github.com/kevinslin/aws-reference-notes/blob/main/services/aws_iot_greengrass/greengrass-nucleus-component.md#greengrass-nucleus-component-configuration-platform-overrides) of the [Greengrass nucleus component](https://github.com/kevinslin/aws-reference-notes/blob/main/services/aws_iot_greengrass/greengrass-nucleus-component.md).
* **Important**To import a Lambda function that you created to run on AWS IoT Greengrass V1, you must define individual component dependencies for the features that your function uses, such as secrets, local shadows, and stream manager. Define these components as [hard dependencies](https://github.com/kevinslin/aws-reference-notes/blob/main/services/aws_iot_greengrass/component-recipe-reference.md) so that your Lambda function component restarts if the dependency changes state. For more information, see [Import V1 Lambda functions](https://github.com/kevinslin/aws-reference-notes/blob/main/services/aws_iot_greengrass/set-up-v2-test-device.md#run-v1-lambda-functions).

## Import a Lambda function (CLI)

* **Important**\
  You must specify an ARN that includes the version of the function to import. You can't use version aliases like `$LATEST`.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://awsnotes.dendron.so/internet-of-things-iot/aws-iot-greengrass/topics/run-lambda-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
