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 réponse
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
EXPERT
répondu il y a 2 ans
profile pictureAWS
EXPERT
vérifié il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions