S3 Put API taking time for the first document upload

0

We have a document upload Lambda created which generates a signed url of s3 bucket for PUT api. This PUT api is being used by front-end to store the file in S3 bucket. In the front end screen we have to upload 5 files and for each file upload it first generates the signurl by invoking the lambda then use the signed url to upload physical file.

The first file upload takes around 15 second where as the 2nd/3rd/.. files takes around 2 sec to upload the same size of (200kb) file. Is the any way to enhance this s3 put api response for first upload.

bibhu02
已提问 2 年前266 查看次数
1 回答
1

My guess here is that the first time a file is uploaded the Lambda function is being initialised and that leads to a longer start time - what is called a "cold start". Subsequent invocations are "warm starts" and are therefore faster.

There are ways to minimise cold start times so it's worthwhile starting your reading at this blog post.

profile pictureAWS
专家
已回答 2 年前
profile pictureAWS
专家
已审核 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则