Giter VIP home page Giter VIP logo

chrome-aws-lambda-layer's Introduction

Google Chrome for AWS Lambda as a layer

58 MB Google Chrome to fit inside AWS Lambda Layer compressed with Brotli

Sparticuz/chromium published as a Lambda Layer.

Tested with Node.js 16x/18x. Compatible with x86_64 only. Has Chromium v122.0.0

Getting Started

Click on Layers and choose "Add a layer", and "Provide a layer version ARN" and enter the following ARN.

arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:43

When importing the module within lambda, make sure you import @sparticuz/chromium not chrome-aws-lambda

const chromium = require('@sparticuz/chromium');

package.json

  • @sparticuz/chromium marked as a dependency
  • puppeteer-core marked as a dependency

lambda container settings:

  • x86_64 architecture
  • =1024mb memory

  • @sparticuz/chromium 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):
layers: [LayerVersion.fromLayerVersionArn(this, 'chromium-lambda-layer',
  'arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:43'
)]

In 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.

Available regions

  • ap-northeast-1: arn:aws:lambda:ap-northeast-1:764866452798:layer:chrome-aws-lambda:43
  • ap-northeast-2: arn:aws:lambda:ap-northeast-2:764866452798:layer:chrome-aws-lambda:42
  • ap-south-1: arn:aws:lambda:ap-south-1:764866452798:layer:chrome-aws-lambda:43
  • ap-southeast-1: arn:aws:lambda:ap-southeast-1:764866452798:layer:chrome-aws-lambda:43
  • ap-southeast-2: arn:aws:lambda:ap-southeast-2:764866452798:layer:chrome-aws-lambda:43
  • ca-central-1: arn:aws:lambda:ca-central-1:764866452798:layer:chrome-aws-lambda:43
  • eu-north-1: arn:aws:lambda:eu-north-1:764866452798:layer:chrome-aws-lambda:43
  • eu-central-1: arn:aws:lambda:eu-central-1:764866452798:layer:chrome-aws-lambda:43
  • eu-west-1: arn:aws:lambda:eu-west-1:764866452798:layer:chrome-aws-lambda:43
  • eu-west-2: arn:aws:lambda:eu-west-2:764866452798:layer:chrome-aws-lambda:43
  • eu-west-3: arn:aws:lambda:eu-west-3:764866452798:layer:chrome-aws-lambda:43
  • sa-east-1: arn:aws:lambda:sa-east-1:764866452798:layer:chrome-aws-lambda:43
  • us-east-1: arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:43
  • us-east-2: arn:aws:lambda:us-east-2:764866452798:layer:chrome-aws-lambda:43
  • us-west-1: arn:aws:lambda:us-west-1:764866452798:layer:chrome-aws-lambda:43
  • us-west-2: arn:aws:lambda:us-west-2:764866452798:layer:chrome-aws-lambda:43

License

MIT © Shelf

chrome-aws-lambda-layer's People

Contributors

vladholubiev avatar vladgolubev avatar actions-user avatar renovate-bot avatar terret avatar stefanzweifel avatar jnd0 avatar ik1ne avatar iwaduarte avatar randomhash avatar aledbf avatar markwainwright avatar ar-naseef avatar pauliokas avatar robertmiles3 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.