0
votes

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.

2

2 Answers

1
votes

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.

1
votes

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.