Aws lambda 无服务器获取本地函数列表

Aws lambda 无服务器获取本地函数列表,aws-lambda,serverless-framework,serverless,serverless-framework-offline,Aws Lambda,Serverless Framework,Serverless,Serverless Framework Offline,场景 我正在为本地Lambda输出编写单元测试。我希望动态生成列表,而不是手动输入所有不同lambda函数的名称 sls deploy list functions 将返回部署到aws的函数列表,但不返回本地无服务器环境中的函数列表 问题 如何获取本地函数的列表 “帮助”菜单对于如何运行本地函数很有用,但对于汇编本地函数列表却很有用 $ sls --help Commands * You can run commands with "serverless" or the shortcut "

场景

我正在为本地Lambda输出编写单元测试。我希望动态生成列表,而不是手动输入所有不同lambda函数的名称

sls deploy list functions
将返回部署到aws的函数列表,但不返回本地无服务器环境中的函数列表

问题

如何获取本地函数的列表

“帮助”菜单对于如何运行本地函数很有用,但对于汇编本地函数列表却很有用

$ sls --help

Commands
* You can run commands with "serverless" or the shortcut "sls"
* Pass "--verbose" to this command to get in-depth plugin info
* Pass "--no-color" to disable CLI colors
* Pass "--help" after any <command> for contextual help

Framework
* Documentation: https://serverless.com/framework/docs/

config ........................ Configure Serverless
config credentials ............ Configures a new provider profile for the Serverless Framework
create ........................ Create new Serverless service
deploy ........................ Deploy a Serverless service
deploy function ............... Deploy a single function from the service
deploy list ................... List deployed version of your Serverless Service
deploy list functions ......... List all the deployed functions and their versions
info .......................... Display information about the service
install ....................... Install a Serverless service from GitHub or a plugin from the Serverless registry
invoke ........................ Invoke a deployed function
invoke local .................. Invoke function locally
logs .......................... Output the logs of a deployed function
metrics ....................... Show metrics for a specific function
package ....................... Packages a Serverless service
plugin ........................ Plugin management for Serverless
plugin install ................ Install and add a plugin to your service
plugin uninstall .............. Uninstall and remove a plugin from your service
plugin list ................... Lists all available plugins
plugin search ................. Search for plugins
print ......................... Print your compiled and resolved config file
remove ........................ Remove Serverless service and all resources
rollback ...................... Rollback the Serverless service to a specific deployment
rollback function ............. Rollback the function to a specific version
slstats ....................... Enable or disable stats

Platform (Beta)
* The Serverless Platform is currently in experimental beta. Follow the docs below to get started.
* Documentation: https://serverless.com/platform/docs/

emit .......................... Emits an event to a running Event Gateway
login ......................... Login or sign up for the Serverless Platform
logout ........................ Logout from the Serverless Platform
run ........................... Runs the Event Gateway and the Emulator
$sls--帮助
命令
*您可以使用“无服务器”或快捷方式“sls”运行命令
*将“-verbose”传递到此命令以获取深入的插件信息
*传递“-no color”以禁用CLI颜色
*在任何上下文帮助后传递“-help”
框架
*文件:https://serverless.com/framework/docs/
配置。。。。。。。。。。。。。。。。。。。。。。。。配置无服务器
配置凭据。。。。。。。。。。。。为无服务器框架配置新的提供程序配置文件
创建。。。。。。。。。。。。。。。。。。。。。。。。创建新的无服务器服务
部署部署无服务器服务
部署功能。。。。。。。。。。。。。。。从服务部署单个功能
部署列表。。。。。。。。。。。。。。。。。。。列出无服务器服务的部署版本
部署列表功能。。。。。。。。。列出所有已部署的函数及其版本
信息。。。。。。。。。。。。。。。。。。。。。。。。。。显示有关服务的信息
安装。。。。。。。。。。。。。。。。。。。。。。。从GitHub安装无服务器服务或从无服务器注册表安装插件
援引调用已部署的函数
调用本地。。。。。。。。。。。。。。。。。。本地调用函数
日志。。。。。。。。。。。。。。。。。。。。。。。。。。输出已部署函数的日志
韵律学。。。。。。。。。。。。。。。。。。。。。。。显示特定函数的度量
包裹打包一个无服务器服务
插件。。。。。。。。。。。。。。。。。。。。。。。。无服务器的插件管理
插件安装。。。。。。。。。。。。。。。。安装插件并将其添加到您的服务中
插件卸载。。。。。。。。。。。。。。卸载并从服务中删除插件
插件列表。。。。。。。。。。。。。。。。。。。列出所有可用的插件
插件搜索。。。。。。。。。。。。。。。。。搜索插件
印刷品。。。。。。。。。。。。。。。。。。。。。。。。。打印编译和解析的配置文件
去除删除无服务器服务和所有资源
回降。。。。。。。。。。。。。。。。。。。。。。将无服务器服务回滚到特定部署
回滚功能。。。。。。。。。。。。。将函数回滚到特定版本
slstats。。。。。。。。。。。。。。。。。。。。。。。启用或禁用统计信息
平台(测试版)
*无服务器平台目前处于试验测试阶段。按照下面的文档开始。
*文件:https://serverless.com/platform/docs/
发出向正在运行的事件网关发送事件
登录。。。。。。。。。。。。。。。。。。。。。。。。。登录或注册无服务器平台
注销。。。。。。。。。。。。。。。。。。。。。。。。从无服务器平台注销
跑运行事件网关和仿真器
这就产生了以下结果:

Service Information
service: <>
stage: <>
region: <>
stack: <>
api keys:
  <>
endpoints:
  <>
functions:
  <List of function names>
服务信息
服务:
阶段:
地区:
堆栈:
api密钥:
端点:
功能:

你有过这样的经历吗?@RMK我们最终选择了对整个团队更有效的方法。德国劳埃德船级社!你的自我回答对我有用!请将您自己的答案标记为正确答案。我不是问Qs的人。这只适用于远程功能,不适用于本地功能
Service Information
service: <>
stage: <>
region: <>
stack: <>
api keys:
  <>
endpoints:
  <>
functions:
  <List of function names>