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개 답변
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
답변함 일 년 전
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
전문가
Uri
답변함 일 년 전
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.

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠