简体   繁体   English

有没有办法用手表更有效地测试 AWS Lambda 功能?

[英]Is there a way to test AWS Lambda functions more efficiently with watch?

Currently I am manually running目前我是手动运行

  1. cdk synth cdk合成器
  2. sam local invoke <lambda_name> -t cdk.out/api.template.json -e events/<event_name>.json sam local invoke <lambda_name> -t cdk.out/api.template.json -e events/<event_name>.json

I run these two steps every single time and the cdk synth takes long time to run.我每次都运行这两个步骤, cdk synth需要很长时间才能运行。 When I develop with other server side Javascript frameworks, I usually start-up the server in "watch" mode so that the changes are applied to the running server immediately.当我使用其他服务器端 Javascript 框架进行开发时,我通常以“监视”模式启动服务器,以便立即将更改应用到正在运行的服务器。 Is there such efficient way to do local development with AWS Lambda functions (in Python)?有没有这样有效的方法来使用 AWS Lambda 函数(在 Python 中)进行本地开发?

Maybe cdk watch is what you need?也许cdk watch是你需要的? See AWS doc .请参阅 AWS 文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS .NET Core 3.1 Mock Lambda 测试工具-如何设置2个或更多函数进行本地测试 - AWS .NET Core 3.1 Mock Lambda Test Tool - How to set up 2 or more functions for local testing 如何在 CDK 中对多个 AWS Lambda 函数进行单元测试? - How to unit test multiple AWS Lambda functions in CDK? aws api网关和lambda函数超时问题 - Aws api gateway and lambda functions timeout problem AWS Lambda 为 postgreSQL 运行 NodeJs - 超时错误 - AWS Lambda functions NodeJs for postgreSQL - timeout error TypeGraphQl:使用 Netlify 函数/AWS Lambda - TypeGraphQl: Usage with Netlify Functions/AWS Lambda 有没有办法让aws lambda function返回404 - is there a way to make aws lambda function return 404 如何在 AWS Lambda 的测试事件页面中测试 xml 请求 - How to test xml request in test event page for AWS Lambda 有什么方法可以在 AWS Glue 作业结束时触发 AWS Lambda function 吗? - Is there any way to trigger a AWS Lambda function at the end of an AWS Glue job? AWS Lambda 功能:它不显示现有角色列表 - AWS Lambda Functions: it doesn't show list of existing roles 在 AWS Lambda function 测试的响应中获取处理程序错误 - Getting Handler Error in Response of AWS Lambda function Test
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM