1개 답변
- 최신
- 최다 투표
- 가장 많은 댓글
0
After the two minutes between executions, Lambda may reuse an existing container (execution context) or create a new one; you cannot rely on a new container always being created. If the container is reused, the /tmp
folder will be populated already. That said, if a previous execution is still running, a new container will be created as to not interfere with the existing function execution (e.g. if you have 100 executions of a function running at the same time, there will be 100 separate containers for them).
답변함 2년 전
관련 콘텐츠
- AWS 공식업데이트됨 8달 전
Thanks for replying so swiftly Justin!
Ok so can I safely assume that a new container will be used if there is a upload from lambda's tmp to S3 ongoing by the time the 2minutes are reached?
It may be smarter to have two separate lambdas, one that passes the download orders to a queue and that has an EventBridge and one that takes its time to download each item added to the queue (and so without a CRON for this second one). Does having multiple containers running for the same lambda mean higher costs as well? I mean compare to the alternative solution I mention just above.
Cheers