shelfio / chrome-aws-lambda-layer

58 MB Google Chrome to fit inside AWS Lambda Layer compressed with Brotli
MIT License
637 stars 45 forks source link

path to chromium executable? #51

Closed jeffehobbs closed 1 year ago

jeffehobbs commented 2 years ago

I'm using this layer in the context of pyppeteer and things are a bit different there. What's the absolute path to the chromium binary while using this layer?

starkos commented 1 year ago

There actually isn't one at first. When the include Node module's chromium.executablePath() is called the required files are decompressed and placed into /tmp. After that, the path will be /tmp/chromium. If you want to access this from something other than NodeJs you'll have to replicate that behavior (I'm currently considering jumping through these hoops with Java).

jeffehobbs commented 1 year ago

Thanks, this makes sense. Maybe I'll try to reverse engineer that function for python. Thanks for the tip!