AWS Lambda Python lots of “could not create '/var/task/__pycache__/FILENAMEpyc'” messages

梦想的初衷 提交于 2020-01-05 04:51:19

问题


In the configuration for my Pyhon 3.6 AWS Lambda function I set the environment variable "PYTHONVERBOSE" with a setting of 1

Then in the Cloudwatch logs for my function it shows lots of messages similar to:

could not create '/var/task/pycache/auth.cpython-36.pyc': OSError(30, 'Read-only file system')

Is this important? Do I need to fix it?


回答1:


I don't think you can write in the /var/task/ folder. If you want to write something to disk inside of the lambda runtime try the /tmp folder.



来源:https://stackoverflow.com/questions/45270330/aws-lambda-python-lots-of-could-not-create-var-task-pycache-filenamepyc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!