How does memory allocation impact processing time while using AWS lambda?

0 votes

I have a Lambda function and its taking about 120ms with 1024mb memory size. I then checked the logs and found out that it was using only 22mb at max, so I tried optimizing it by reducing to 128mb.

But when I did that the time went from 120ms to 350ms and only 22mb memory was being used. So, i am a bit confused. How does memory allocation impact processing time.

Feb 21 in AWS by datageek
• 3,040 points
52 views

1 answer to this question.

0 votes

The underlying CPU power is directly proportional to the amount of memory that you choose. So basically that memory knob controls your CPU allocation as well.

So that is the reason why you are seeing that reducing the memory causes Lambda to take more time for execution

answered Feb 21 by Archana
• 5,560 points

Related Questions In AWS

0 votes
1 answer

How to set-up DynamoDB trigger using AWS Lambda?

Well this code worked for me. You ...READ MORE

answered Aug 20, 2018 in AWS by Archana
• 4,090 points
567 views
0 votes
1 answer
0 votes
1 answer

How to access AWS Lambda environment variables using Java?

In Spring Core change the PropertySourcesPlaceholderConfigurer class can ...READ MORE

answered Oct 24, 2018 in AWS by Priyaj
• 56,540 points
613 views
0 votes
1 answer

How to Pass the VPC ID while creating the Ec2 instance in AWS using Python Boto3

import boto3 ec2 = boto3.resource('ec2') instance = ec2.create_instances( ...READ MORE

answered Jan 29 in AWS by Priyaj
• 56,540 points
292 views
0 votes
1 answer
0 votes
1 answer
+2 votes
3 answers
0 votes
1 answer

How to get aws lambda response as an HTML page

Store the HTML markup in a variable and return ...READ MORE

answered Dec 4, 2018 in AWS by Archana
• 5,560 points
114 views
0 votes
1 answer

How to find out current region with AWS Lambda?

You can read the AWS_DEFAULT_REGION environment variable and use ...READ MORE

answered Dec 20, 2018 in AWS by Archana
• 5,560 points
371 views