- Newest
- Most votes
- Most comments
Each concurrent Lambda invocation runs in its own run time environment with its own /tmp folder. There will not be collisions. Subsequent invocation may reuse existing environments, so the file may still be there in the /tmp, but again, it is from a previous invocation and not from a concurrent one.
Lambda will not have parallel invocations that use the same container. Containers will be reused if they have previously been provisioned and are idle (before being reclaimed by the service after some time), but no container will serve multiple requests at the same time. In the case of multiple requests, separate containers will be provisioned for each and there will be no race conditions on your file. Just make sure your code pulls down a fresh copy of the CSV every time the function is invoked.
You can always add a random number job id or use aws_request_id (https://docs.aws.amazon.com/lambda/latest/dg/python-context.html) to your csv file name to make them unique.
Relevant content
- Accepted Answerasked a year ago
- asked a month ago
- Accepted Answerasked 7 months ago
- asked 7 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago