简体   繁体   中英

AWS SAM local debugging is chargeable?

I am using Visual Studio code for debugging a lamda function written in python. Is the local execution of the lamda function is chargeable? 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.

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.

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. The CLI provides a Lambda-like execution environment locally. It helps you catch issues upfront by providing parity with the actual Lambda execution environment.

AWS SAM CLI provides a Lambda-like execution environment locally . So it tries to mimic the actual Lambda environment in your local machine. 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.

In contrast, if you use a Serverless IDE such as SLAppForge Sigma , it will run your debugging code on the actual AWS environment.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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