headless-chrome-aws-lambda-layer icon indicating copy to clipboard operation
headless-chrome-aws-lambda-layer copied to clipboard

Too Big

Open bablo1979 opened this issue 3 years ago • 4 comments

The package seems to be too big, following the necessary steps to use it as Lambda Layer I get the following error:

Resource handler returned message: "Function code combined with layers exceeds the maximum allowed size of 262144000 bytes. The actual size is 288155599 bytes.

any ideas on how to reduce it?

bablo1979 avatar Jul 13 '22 15:07 bablo1979

@bablo1979 the same issue.. did you found a solution?

adirzoari avatar Oct 12 '22 14:10 adirzoari

Sorry, the chrome and driver binaries need a lot of space and cannot be trimmed. I suggest finding alternatives to trim the size of other libraries. Example: avoid embedding binaries in the libraries with the flag --no-binary.

diegoparrilla avatar Oct 12 '22 14:10 diegoparrilla

@bablo1979 the same issue.. did you found a solution?

I solved creating an AMI with a real Chrome+Selenium and deploying it on EC2 when I need it... this was fitting for my needs, but AWS bills are slighly differents without Free Tier, I will try the author suggested solution, maybe I will drop a message it can work..

bablo1979 avatar Oct 12 '22 16:10 bablo1979

Sorry, the chrome and driver binaries need a lot of space and cannot be trimmed. I suggest finding alternatives to trim the size of other libraries. Example: avoid embedding binaries in the libraries with the flag --no-binary.

Many thanks, I will try..

bablo1979 avatar Oct 12 '22 16:10 bablo1979