AWS Cloud9:本地引用Lambda层
我已经设置了一个Cloud9环境来开发和测试lambda函数.为了使环境更干净",我选择使用lambda层来指定函数的依赖关系.这样,我已经从环境中删除了依赖文件夹,但是现在无法在本地进行测试.
I have set-up a Cloud9 environment to develop and test lambda functions. To make the environment "cleaner" I have opted to use lambda layers to specify the function's dependencies. By doing this, I have removed the dependency folders from the environment, but I am now unable to test locally.
例如,我为Stripe的python库提供了一个lambda层.我能够在Cloud9引用条中编写lambda函数,部署该函数,并成功地远程测试该函数.但是我无法在本地运行该功能,因为我无法导入条带"
For example, I have a lambda layer for Stripe's python library. I am able to write a lambda function in Cloud9 referencing stripe, deploy the function, and successfully test the function remotely. But i am unable to run that function locally, as I get "unable to import stripe"
是否有一种方法可以通过在Cloud9中指定ARN层来本地测试依赖于lambda层的lambda函数?
Is there a way to test a lambda function, that depends on a lambda layer, locally by specifying the layer ARN in Cloud9?
不幸的是,AWS Cloud9目前不支持Lambda层.
Unfortunately, AWS Cloud9 does not support Lambda layers at the moment.