简体   繁体   English

AWS SAM 本地调试是否收费?

[英]AWS SAM local debugging is chargeable?

I am using Visual Studio code for debugging a lamda function written in python.我正在使用 Visual Studio 代码调试用 python 编写的 lamda function。 Is the local execution of the lamda function is chargeable? lamda function本地执行是否收费? since at the end of each execution we are getting an entry in the log showing execution time charged.因为在每次执行结束时,我们都会在日志中获得一个显示执行时间的条目。

Please note we are calling some AWS api from within the lamda function, and that is understandably chargable, I have no issues with that.请注意,我们在 lamda function 中调用了一些 AWS api,这是可以理解的收费,我对此没有任何问题。

No, you are not charged for debugging it locally.不,您无需在本地调试它。 SAM just creates a local environment which is quite similar to the environment your Lambda functions run in. SAM 只是创建一个本地环境,该环境与您的 Lambda 函数运行的环境非常相似。

From the docs :文档

Local debugging and testing.本地调试和测试。 The AWS SAM CLI lets you locally build, test, and debug serverless applications that are defined by AWS SAM templates. AWS SAM CLI 允许您在本地构建、测试和调试由 AWS SAM 模板定义的无服务器应用程序。 The CLI provides a Lambda-like execution environment locally. CLI 在本地提供类似 Lambda 的执行环境。 It helps you catch issues upfront by providing parity with the actual Lambda execution environment.它通过提供与实际 Lambda 执行环境的奇偶性来帮助您提前发现问题。

AWS SAM CLI provides a Lambda-like execution environment locally . AWS SAM CLI在本地提供类似 Lambda 的执行环境。 So it tries to mimic the actual Lambda environment in your local machine.所以它试图在你的本地机器上模拟实际的 Lambda 环境。 But since the execution is running on your local machine, it won't be charged.但由于执行是在您的本地计算机上运行的,因此不会收费。

Probably the log would be similar to what you see in the actual Lambda environment because SAM CLI is trying to mimic the actual Lambda output format as well.日志可能与您在实际 Lambda 环境中看到的类似,因为 SAM CLI 也在尝试模仿实际的 Lambda output 格式。

In contrast, if you use a Serverless IDE such as SLAppForge Sigma , it will run your debugging code on the actual AWS environment.相反,如果您使用无服务器 IDE (例如SLAppForge Sigma ),它将在实际 AWS 环境中运行您的调试代码

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM