Test various memory sizes

On the AWS Console page, click on the Lambda link under the Compute section (or search for Lambda).

Click on the AWS Lambda function name you have published.

Go to Configuration tab, check that default memory size is 256Mb. Click Edit.

Memory

AWS Lambda allocates CPU power in proportion to the amount of memory configured. Update memory size to 4096Mb.

Memory

Now from Visual Studio you can upload same image again to the images folder and check that thumbnail is generated as before.

Now go to Monitor tab and click View logs in CloudWatch.

Memory

You should see two log streams: one when Lambda function had 256Mb of memory and latest one when it had 4096Mb of memory.

Memory

Check log entries in both streams:

Memory

Memory

As you can see, the memory size has affected the performance as your function is allocated CPU proportional to the memory configured.