Closed serverlesspolska closed 4 years ago
Looking at this path /home/pawel/serverless/leniuch/src/harvest/fetchLinksFromWebsite.js:34:11
I'm assuming you're trying to run code locally? If that's the case, the problem might be with the tool you use to run lambdas locally, it should support Lambda Layers and unpack them at runtime
Hi @vladgolubev,
this is actually from the JavaScript source maps - I'm using a webpack to transpile the code.
Code is executed on AWS Lambda
OK, it just doesn't work with a webpack.
For reference I am using
plugins:
- serverless-bundle
Thank you for publishing these layers!
Sorry to ping on a closed issue, but I'm also trying to leverage one of these layers and am getting errors. Are there any guides as how to pair this up with the appropriate puppeteer
version on AWS as a layer? Are there any security settings I may need to set up? Any tips/suggestions would be greatly appreciated :)
@loganpowell would be helpful if you post one of those errors. Otherwise, the code from https://github.com/alixaxel/chrome-aws-lambda#usage should work out-of-the-box
@vladgolubev thank you for the quick follow up!
I would post the error, but the actual aws logging console is error'ing out (so no error logs are being produced).
Thank you for that link. Just to clarify, do I still have to npm install chrome-aws-lambda puppeteer-core --save-prod
to leverage the layer or do I leave any/both of them out and let the layer fulfill the references/imports
const chromium = require('chrome-aws-lambda');
...
in my code?
@loganpowell you don't need to install those dependencies, they are inside layer already
Hi,
Could you please explain how to use this layer? I have added
in my serverless.yml And I'm using exactly the same code from https://github.com/alixaxel/chrome-aws-lambda#usage
Unfortunately, I get