_multiprocessing.SemLock is not implemented when running on AWS Lambda

前端 未结 5 1739
Happy的楠姐
Happy的楠姐 2020-12-13 19:59

I have a short code that uses the multiprocessing package and works fine on my local machine.

When I uploaded to AWS Lambda and run there,

5条回答
  •  無奈伤痛
    2020-12-13 20:46

    As far as I can tell, multiprocessing won't work on AWS Lambda because the execution environment/container is missing /dev/shm - see https://forums.aws.amazon.com/thread.jspa?threadID=219962 (login may be required).

    No word (that I can find) on if/when Amazon will change this. I also looked at other libraries e.g. https://pythonhosted.org/joblib/parallel.html will fallback to /tmp (which we know DOES exist) if it can't find /dev/shm, but that doesn't actually solve the problem.

提交回复
热议问题