This example of AWS Lambda pricing is taken directly from the AWS service pricing page, and additional details can be found on that page.
Lambda counts, as a request, each time it starts executing in response to an event notification or invocations call, including test invocations from the console. You are charged for the total number of requests across all your functions.
Duration is calculated from the time your code begins executing until it returns or otherwise terminates, rounded up to the nearest 100 ms. The price depends on the amount of memory you allocate to your function.
The following table shows the free tier seconds and the approximate price per 100 ms associated for different memory sizes: