0

I have a Python script that scrapes data from a webpage.

It works on my local but not on AWS Lambda because it only allows writes new file to /tmp directory.

I tried to go through request_html render API and it seems like it's not possible to change the file location. It default take current working directory by default. It's causing error as below

Error detail Read-only file system: '/home/sbx_user123'

Thank you in advance.

qangdev
  • 336
  • 5
  • 15

1 Answers1

0

How's set an environment variable below from lambda web UI?

PYPPETEER_HOME=/tmp/

It may change working directory of pyppeteer (a module running inside request_html).

maybe, it's a related question: Pyppeteer fails to download headless chrome when running on AWS Lambda