You are building up a Lambda function that runs periodically and processes the data stored in a DynamoDB table.
As the data in the DynamoDB table grows fast, you need to estimate the cost of the Lambda function.
Which of the following factors directly determine the monthly cost of Lambda? (Select TWO.)
Click on the arrows to vote for the correct answer
A. B. C. D. E.Correct Answer - C, E.
Option A is incorrect: Because users are charged based on the number of requests and the time it takes for the code to execute.
The programming language does not directly determine the cost.
Option B is incorrect: Because the Lambda function handler does not impact the monthly cost at all.
Option C is CORRECT: Because the duration price depends on the amount of memory allocated to the function.
Option D is incorrect: Because the timeout value is not a direct factor in calculating the price.
Please check the below reference for details.
Option E is CORRECT: Because the Lambda function charges you based on the number of requests, such as $0.20 per 1M requests.
Reference:
https://aws.amazon.com/lambda/pricing/Sure, I'd be happy to provide a detailed explanation!
Lambda is a serverless compute service provided by AWS, which enables developers to build and run applications without having to manage servers. The cost of Lambda is calculated based on the number of requests and the duration of the function execution. Let's explore the factors that directly determine the monthly cost of Lambda:
Lambda functions are priced based on the amount of memory allocated to them. Memory allocation determines the amount of CPU power and network bandwidth that the function can access. The minimum amount of memory that can be allocated to a Lambda function is 128 MB, and the maximum is 3,008 MB (or 3 GB). When you allocate more memory to a function, you also get more CPU power and network bandwidth. The price per 100ms of execution time is calculated based on the amount of memory allocated to the function.
The number of requests is the number of times your function is invoked during its execution. AWS charges for every 1 million requests. If your function is invoked more than 1 million times, the cost is calculated based on the total number of requests, divided by 1 million.
The other options mentioned in the question, like the programming language used, the handler, and the timeout value of the Lambda function, do not directly impact the cost of the function. The programming language and the handler only affect the development and performance of the function, and the timeout value determines the maximum duration that a function can run before it times out.
In summary, the two factors that directly determine the monthly cost of Lambda are the memory allocated to the function and the total number of requests.