Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install cypress on aws Lambda

I want to install cypress on AWS lambda for performing testcases. I have explored the internet but none of the solutions are working for me like storage issues of lambda etc. Can anyone give me a reference about this? Thank you in Advance.

like image 901
Msv Avatar asked Dec 01 '25 08:12

Msv


1 Answers

In order to get cypress running on AWS lambda, there are a few issues that you need to work through.

I've put together a full minimal example of how to get cypress running on lambda.

I'll cover the highlights of what is involved.

Lambda runs with a read-only file system, using an unprivileged user, and no ipc or shared memory device.

The only writable location is the /tmp directory, which has 512mb of space by default.

  • Cypress needs to be installed at a location that is readable by non-privileged users.
  • In order to get electron to work, it's binary needs to be patched so it doesn't try and use /dev/shm
  • Cypress requires that project directory is writable, which means that you need to copy the project into the /tmp directory, or patch cypress so it won't crash.
  • We need to pass a bunch of flags to chromium, to disable features that use things like GPU, and shared memory, which aren't available on lambda.
like image 123
Magnus Avatar answered Dec 05 '25 01:12

Magnus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!