Final answer:
To compute the total monthly charges for AWS Lambda, multiply the total number of seconds the function ran, the allocated memory, and the price per GB-s. In this case, the total monthly charge is $25.
Step-by-step explanation:
To compute the total monthly charges for AWS Lambda, you need to calculate the total number of seconds your function ran and multiply it by the memory allocated for the function and the price per GB-s. In this case, the function ran 3 million times for 2 seconds each time, which totals to 6 million seconds. If you allocated 256 MB of memory, it is equivalent to 0.25 GB. The AWS Lambda pricing is $0.00001667 per GB-s. So, the total monthly charge can be calculated as:
Total Monthly Charge = (6,000,000 seconds) x (0.25 GB) x ($0.00001667 per GB-s)
Total Monthly Charge = $25