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 Antwort
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
EXPERTE
beantwortet vor 2 Jahren
profile pictureAWS
EXPERTE
überprüft vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen