1

Consider my Lambda package size is 100 mb (unzipped) and on its invocation, it uses say x mb. So will I be charged for the memory slot w.r.t (x + 100) mb OR only x mb?

2 Answers 2

1

The Lambda pricing does not depend upon the package size - rather it's the RAM (apart from the number of executions and duration)

In the AWS Lambda resource model, you choose the amount of memory you want for your function, and are allocated proportional CPU power and other resources. An increase in memory size triggers an equivalent increase in CPU available to your function

Sign up to request clarification or add additional context in comments.

Comments

0

You are charged based on the number of requests for your functions and the duration, the time it takes for your code to execute. However, memory size you choose for your Lambda functions changes per 100ms execution cost.

Charges also differ on the basis of region in which lamda is executing.

For example: for 100 MB memory (Comes under 128 MB option) in US EAST(Ohio) region it will charge you $0.000000208 per 100ms.

You can find the details here and cacluate your cost

About package size:

The maximum limit of the size of deployment package is 250 MB when uploaded via S3. However we can’t upload more than 50 MB package while uploading directly into lambda function.

If we consider a larger package size it may seriously affect lambda function’s cold start time. Consequently, the lambda function will take longer time to execute with larger package size.

2 Comments

I know that too, but is my package size included in that 100 mb memory?
@SalimKhan That memory is your execution memory however, your lamda will have different memory for package. but as i updated in my answer, greater package size will increase the cold start time which will effect your lamda cold start time and execution time, which will still effect your cost. package size is different then the execution memory, for uploading your package which is more than 50MB, you have to use S3, I hope it helps.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.