如何在本地测试AWS Lambda函数? [英] How can I test AWS Lambda functions locally?

查看:207
本文介绍了如何在本地测试AWS Lambda函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请向我解释在本地测试lambda函数的最佳方法是什么.我使用sam local和此解决方案https://github.com/lambci/docker-lambda进行测试,但是例如,在发生另一个错误的情况下调用一个lambda的情况.通常,我无法为方法创建存根,因为lambda在容器中运行

Explain to me please what is the best way to locally test the lambda function. I used sam local and this solution https://github.com/lambci/docker-lambda for testing, but for example, where I invoke one lambda from another error occurs. In general, I can't make stubs for methods since lambda runs in a container

推荐答案

有两个选项.接下来的两个是一些受欢迎的.

There are a couple of options. Following two are some popular ones.

  • Serverless framework along with the serverless-offline plugin.
  • LocalStack

这篇关于如何在本地测试AWS Lambda函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆