如何在 AWS CLI 中使用 ARN 获取 lambda 函数?

How can I get the a lambda function by using its ARN in the AWS CLI?

我正在使用适用于 AWS 的 Azure 工具包创建我的 lambda,然后 运行 一些 powershell 脚本对其进行操作。创建后,我将函数的 ARN 作为输出。我在 documentation 中看不到可以通过 ARN 访问该函数的任何地方,所有内容都将 function-name 作为参数。

在为 AWS lambda API.

执行 AWS CLI 调用时,您可以在 --function-name 参数中使用 ARN

下面是 get-function api 的示例:

--function-name (string)

The name of the Lambda function, version, or alias.

Name formats

Function name - my-function (name-only), my-function:v1 (with alias).

Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function .

Partial ARN - 123456789012:function:my-function