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.

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
전문가
답변함 일 년 전
profile pictureAWS
전문가
검토됨 일 년 전

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

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

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

관련 콘텐츠