# AWS Lambda@Edge memorySize max limit

**URL:** <https://forum.serverless.com/t/aws-lambda-edge-memorysize-max-limit/9627>\
**Category:** Serverless Framework\
**Tags:** aws, lambda\
**Created:** [October 15, 2019, 9:33pm UTC](https://forum.serverless.com/t/aws-lambda-edge-memorysize-max-limit/9627 "2019-10-15T21:33:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![winstonwp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/winstonwp/32/3701_2.png) [@winstonwp](https://forum.serverless.com/u/winstonwp)\
**Post date:** [October 15, 2019, 9:33pm UTC](https://forum.serverless.com/t/aws-lambda-edge-memorysize-max-limit/9627/1 "2019-10-15T21:33:05Z")

</div>

Hello,  
I’m using an image resize lambda function following [this blog from aws](https://aws.amazon.com/blogs/networking-and-content-delivery/resizing-images-with-amazon-cloudfront-lambdaedge-aws-cdn-blog/), I’m able to configure the example manualy in AWS and with the lambda@edge function setup with a memorySize of 512MB or more of memory and a timeout greater than 5 seconds. This is required for me, otherwise the image resize function would timeout almost every time.

Setting the function with serverless, the hardcoded limit of 128MB memorySize and 5 seconds timeout it’s throwing and error:

> Error: “originResponseFunction” memorySize is greater than 128 which is not supported by Lambda@Edge functions

I haven’t been able to find any official documentation for AWS that this limits are no longer true, but in practice I’m able to set them up to values greater than this limits for origin-response functions.

Is there a way to modify this limits and or disabling `validate()` for an specific cloudFront event? If not would a pull request be welcome to disable the memorySize and timeout validations for an specific cloudFront event?

My serverless version details are:

> sls --version  
> Framework Core: 1.54.0  
> Plugin: 3.1.2  
> SDK: 2.1.2  
> Components Core: 1.1.1  
> Components CLI: 1.2.3

---

<div class="post-metadata">

**Author:** ![praneetrattan](https://avatars.discourse-cdn.com/v4/letter/p/e36b37/32.png) [@praneetrattan](https://forum.serverless.com/u/praneetrattan)\
**Post date:** [November 6, 2019, 12:54pm UTC](https://forum.serverless.com/t/aws-lambda-edge-memorysize-max-limit/9627/2 "2019-11-06T12:54:36Z")

</div>

How have you configured the function in your serverless.yml? You can override the memory limits by adding `memorySize` and `timeout` to the yml.

> **[Serverless Framework - AWS Lambda Guide - Serverless.yml Reference](https://serverless.com/framework/docs/providers/aws/guide/serverless.yml/)**
>
> A list of all available properties on serverless.yml for AWS

---

<div class="post-metadata">

**Author:** ![winstonwp](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/winstonwp/32/3701_2.png) [@winstonwp](https://forum.serverless.com/u/winstonwp)\
**Post date:** [November 8, 2019, 6:28am UTC](https://forum.serverless.com/t/aws-lambda-edge-memorysize-max-limit/9627/3 "2019-11-08T06:28:16Z")

</div>

Thanks for the reply @praneetrattan, I created this PR and it has just been published fixing the issue, now you are able to configure this in version 1.57.0

> <https://github.com/serverless/serverless/pull/6922>
