The duration of the code is calculated from the moment your code begins executing until it returns or is terminated.
If you're unsure about whether AWS Lambda is right for you, there is a free tier option available to try. This option includes 1M free requests per month, and 400,000 GB-seconds of compute time per month.
If you'd like to learn more about AWS Lambda, check out Amazon's handy AWS Lambda FAQ.
If you're looking to streamline processes and cut back on your coding efforts, you should absolutely invest in AWS Lambda. By reviewing the AWS Lambda FAQ, you can orient yourself on the ins-and-outs of this computing system and determine if it's right for you.
Once you have finished going through the frequently asked questions you will probably start to wonder about the observability aspect of your serverless app or to better put it, the lack thereof. You wouldn't be the first one to think like that, but luckily there are a number of services that can help you in that regard. Take Dashbird.io for example, they can help you monitor your serverless environment, set up alerts and keep track of costs without adding any strain to your application. Furthermore, they have a pretty decent free tier that is more than enough to get you started. You can sign up right now to start monitoring your serverless app for free!
Failure detection, analytics and visibility for serverless applications in under 5 minutes.