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
• 2,830 points
38 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,280 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
• 3,770 points
268 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,100 points
294 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,100 points
125 views
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,280 points
76 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,280 points
101 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.