Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Lambda Function #16

Open
aydrian opened this issue Oct 4, 2021 · 3 comments
Open

Running on Lambda Function #16

aydrian opened this issue Oct 4, 2021 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@aydrian
Copy link

aydrian commented Oct 4, 2021

Was wondering if anyone has tried getting the to run on a Rust AWS Lambda function? The Node.js side has
playwright-aws-lambda
to assist. It's currently failing for me because Playwright::initialize() attempts to download the driver to the read-only file system. Wondering if it'd be possible to use Playwright::with_driver(driver) with a driver packaged with the function.

Thank you

@d4h0
Copy link

d4h0 commented Oct 20, 2021

Have you seen Playwright::with_driver?

You can install browsers yourself, and then point Playwright to their location.

Looks like, that's what playwright-aws-lambda does.

@physics515
Copy link

Have you seen Playwright::with_driver?

You can install browsers yourself, and then point Playwright to their location.

Any examples of how this would look in practice? I'm fairly new to Rust and I'm trying to get this working with Docker. I have it working but the browsers are not persistent between container spin-ups. I have mounted a persistent storage to the container, but I need to figure out how to specify the download location.

@jtomek
Copy link

jtomek commented Aug 3, 2022

Would somebody like to team up and develop a Dockerfile and SAM configuration that would "just run" on AWS Lambda? I have been looking into this for weeks, developed half-done solutions for what looks like all Linux distributions, but cannot manage to finalise it:

Key challenges (no particular order) I have faced:

  • Limited drivers on AL2 -> need for a different Linux Distribution
  • Size of the image should be small: Best would be Alpine, Playwright supports Ubuntu and Debian
  • Rust compilation to arm64 vs amd64
  • Path to the driver vs executable (It is possible to have a working Chromium on Alpine but the driver "playwright.sh" doesn't connect correctly)
  • Temporary folder - EFS configuration
  • User / Group Permissions need to align with Lambda
  • Very slow Dev.Ops. speed to test since it requires everything to recompile and redeploy just to test a small change

I would love to team up with somebody and share the Dockerfiles and SAM configuration so we can provide a solution to the community.

@octaltree octaltree added the help wanted Extra attention is needed label Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants