Sorry to be a pest, but I've been messing about all day with this and have only just realised that the layer is only x86 compatible, not ARM compatible.
Would appreciate that being marked somewhere in the docs :')
FYI for the next poor person using this layer, and maybe not familiar with lambda layers, here's the settings you want:
package.json
@sparticuz/chrome-aws-lambda marked as a dependency
puppeteer-core marked as a dependency
lambda container settings:
x86_64 architecture
=512mb memory
@sparticuz/chrome-aws-lambda marked as an externalModule in the bundling settings
A lambda layer marked like so (this is CDK code, but convert to SAM or whatever at will):
Hi,
Sorry to be a pest, but I've been messing about all day with this and have only just realised that the layer is only x86 compatible, not ARM compatible.
Would appreciate that being marked somewhere in the docs :')
FYI for the next poor person using this layer, and maybe not familiar with lambda layers, here's the settings you want:
package.json
@sparticuz/chrome-aws-lambda
marked as a dependencypuppeteer-core
marked as a dependencylambda container settings:
@sparticuz/chrome-aws-lambda
marked as an externalModule in the bundling settingsIn the deployed lambda code You can just use a regular ES6 or CommonJS import statement for
@sparticuz/chrome-aws-lambda
, and just use as indicated.Just a note, I don't have it currently resolving properly, locally, with Jest, it throws some prototyping error when trying to resolve puppeteer.