Increase quota Synchronous payload on AWS Lambda to receive large video file?

0

Hi Everyone,

Currently we have dedicated microservice API to upload video. this API is not frequently being called by client. Only around 20 times per month. So I plan to move it to Lambda API (with 15 minutes timeout) and integrate it to current Application Load Balancer.

So the stack will become like : Application Load Balancer -> Lambda API -> S3

I verified already, this lambda API can store small video file like 500 KB, but when I want to upload large video (like 80 MB), I get this error : "413 Request Entity Too Large". Although I set Lambda function memory 2 GB & storage 2 GB.

My Question : Do I need to request to increase quota Synchronous payload on AWS Lambda? or maybe any other service quota under AWS Lambda that I need to increase?

Thank You.

3 Answers
2

Hi,

For this kind if operation, I would suggest to have the client directly upload to S3. You can even use S3-Accelaration to reduce the upload time a bit (depending on client and bucket location).

To grant your client access to S3, you have several choices:

You are already using Cognito Identity Pool: Your client will receive temporary credentials upon login. Adapt the role policies to allow S3 PutObject and have the client uploading the file via it's AWS-SDK

Have your API return a presigned URL on which the client can do a POST. Have a trigger on S3 (Object Created) that kicks-off a Lambda to process the file

Hope this helps,

Regards, Daniel

profile picture
answered a year ago
2

You can't increase the payload size to a Lambda function. The limit is 256KB for asynchronous invocations and 6MB for synchronous invocations (as from ALB).

The recommended approach is to generate a presigned URL and upload the file directly to S3 from the client using that URL.

profile pictureAWS
EXPERT
Uri
answered a year ago
0

Hi Daniel & Uri,

Thanks for the answers. After read your answer, we did some exploration.

We plan to use EFS together with existing ECS. Right now, we still exploring how to link those.

Thank You.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions