chrome-aws-lambda | Chromium Binary for AWS Lambda and Google Cloud Functions | Cloud Functions library

 by   alixaxel TypeScript Version: v10.1.0 License: MIT

kandi X-RAY | chrome-aws-lambda Summary

kandi X-RAY | chrome-aws-lambda Summary

chrome-aws-lambda is a TypeScript library typically used in Serverless, Cloud Functions, Nodejs applications. chrome-aws-lambda has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can download it from GitHub.

Chromium Binary for AWS Lambda and Google Cloud Functions
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              chrome-aws-lambda has a medium active ecosystem.
              It has 3009 star(s) with 275 fork(s). There are 45 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 57 open issues and 190 have been closed. On average issues are closed in 26 days. There are 9 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of chrome-aws-lambda is v10.1.0

            kandi-Quality Quality

              chrome-aws-lambda has 0 bugs and 0 code smells.

            kandi-Security Security

              chrome-aws-lambda has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              chrome-aws-lambda code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              chrome-aws-lambda is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              chrome-aws-lambda releases are not available. You will need to build from source code and install.
              Installation instructions, examples and code snippets are available.
              It has 44 lines of code, 0 functions and 16 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of chrome-aws-lambda
            Get all kandi verified functions for this library.

            chrome-aws-lambda Key Features

            No Key Features are available at this moment for chrome-aws-lambda.

            chrome-aws-lambda Examples and Code Snippets

            No Code Snippets are available at this moment for chrome-aws-lambda.

            Community Discussions

            QUESTION

            Serverless invoke error: "is not authorized to perform: dynamodb:BatchWriteItem on resource: arn:aws:..."
            Asked 2021-Nov-06 at 20:41

            I have this iamRoleStatements on my serverless.yml, which should allow those actions to my lambda functions:

            ...

            ANSWER

            Answered 2021-Nov-06 at 20:41

            Unless you've edited/redacted TABLE_NAME in the error message, my guess is that you're inadvertently attempting to write to a table which probably doesn't exist (TABLE_NAME).

            You haven't posted your handler code, but I'd check your code and verify that your actual table name is being set/interpolated correctly before your handler code attempts to insert an item with the DynamoDB API.

            Source https://stackoverflow.com/questions/69866414

            QUESTION

            Local time zones with headless chrome in a lambda layer
            Asked 2021-Jul-07 at 02:16

            I'm running headless chrome in a lambda layer (https://github.com/alixaxel/chrome-aws-lambda).

            Issue is, I am trying to call .toLocaleString("en-AU"), but everything comes out as UTC/GMT regardless. I have read that node didn't always ship with internationalization options. I'm assuming something along those lines is what is going on here.

            Any suggestions for how to work around this?

            ...

            ANSWER

            Answered 2021-Jul-07 at 02:16

            You can use moment.js for better control over time and time formats in NodeJS Lambda

            https://momentjs.com/timezone/

            Source https://stackoverflow.com/questions/68249358

            QUESTION

            How to use chrome-aws-lambda on a AWS lambda function created with Amplify
            Asked 2020-Dec-09 at 23:28

            I'm trying to create this lambda function in AWS using Amplify however when I try to launch the chromium the lambda function does not return any value and the function end up timing up:

            "errorMessage": "2020-12-09T02:56:56.210Z 57402f8e-9fb2-4341-837d-bdf2ee6e9262 Task timed out after 25.57 seconds" I add the Layer as suggested by @James Shapiro, now I'm getting a URL return for the chromium but it still not launching it:

            This is my function:

            ...

            ANSWER

            Answered 2020-Dec-09 at 04:10

            Have you tried installing a chrome-aws-lambda layer and then adding it to your function? See the instructions here in the "AWS Lambda Layer" section.

            Source https://stackoverflow.com/questions/65210103

            QUESTION

            Iterate over multiple payloads and take multiple screenshots with Puppeteer AWS Lambda
            Asked 2020-Aug-23 at 03:42

            I am currently using the following Puppeteer AWS Lambda Layer to scrape 30 URLs and create and save screenshots in S3. At the moment, I send 30 individual payloads therefore running 30 AWS Lambda functions. https://github.com/shelfio/chrome-aws-lambda-layer

            Each JSON payload contains a URL and an image file name that are sent every 2-3 seconds to API Gateway via a POST request. The first 6 or 9 Lambda functions in the list seem to run fine, then they start to fail with Navigation failed because browser has disconnected! as reported in AWS Cloudwatch.

            So I am looking for an alternative solution, How could I edit the code below to batch screenshot a set of 30 URLs, by handling a single array of JSON payloads? (eg. For loop etc)

            Here is my current code for generating individual AWS Lambda screenshots and sending to S3:

            ...

            ANSWER

            Answered 2020-Aug-23 at 03:42

            I tried to replicate the issue and modify the code to use loop.

            While working on this issue, I found several things worth pointing out:

            • the lambda requires a lot of RAM (at least 1GB in my test, but more better). Using small amount of RAM lead to failures.
            • lambda timeout must be large to handle a number of URLs to screenshot.
            • your img from the JSON payload is not used at all. I did not modify this behavior, as I don't know if this is by design or not.
            • similar errors to yours were observed when running async for loop and/or not closing pages opened.
            • modified return value to output an array of s3 urls.
            • undefied URL
            Modified code

            Here is the modified code that worked in my tests using nodejs12.x runtime:

            Source https://stackoverflow.com/questions/63489068

            QUESTION

            Puppeteer Failing To Launch Browser
            Asked 2020-Jun-12 at 08:46

            I am currently working on an AWS Lambda that generates a PDF from HTML. The lambda is working perfectly once deployed however I would like to get it to run locally to make development easier.

            I have installed SAM from AWS as well as Docker which AWS says will be needed to run a lambda locally.

            In my solution folder in the command line I am running sam local invoke "HelloWorldFunction" -e pdf/test-data/test.json which then appears to work as it says that it is fetching it and then mounting it to the local docker container. However it then gives the following error:

            Which appears to be an error about the puppeteer executable for chrome not existing even though it is in there. I am using the following variables:

            ...

            ANSWER

            Answered 2020-Jun-12 at 08:46

            It looks like I had to use the path provided by chrome-aws-lambda. So the code to generate the browser looks like this and it works:

            Source https://stackoverflow.com/questions/62340302

            QUESTION

            Serverless framework: Serverless Error Function not found:
            Asked 2020-Jun-05 at 18:41

            I'm getting started with nodejs and the serverless framwork.

            My handler.js contains:

            ...

            ANSWER

            Answered 2020-Jun-05 at 18:41

            Let me explain here. Serverless framework can invoke(run) lambda in two ways(locally and in cloud-AWS). It seems you are trying to invoke lambda in AWS. (arn:aws:lambda:us-east-1:155754363046:function:sellthelandnow-dev-hello) Basically this arn does not exist in your AWS-155754363046 account. you need to use

            Source https://stackoverflow.com/questions/62221815

            QUESTION

            How to see console.log statements in deployed Lambda function
            Asked 2020-Jun-05 at 00:41

            I'm getting started trying to write a lambda function with node and puppeteer. I'm using the serverless framework

            I've been trying to follow https://codissimo.sinumo.tech/2019/12/27/serverless-puppeteer-with-aws-lambda-layers-and-node-js/ to utilize the provisioned chrome at https://github.com/shelfio/chrome-aws-lambda-layer . My function is working as expected locally.

            my handler.js contains:

            ...

            ANSWER

            Answered 2020-May-31 at 20:35

            These are accessible in CloudWatch logs.

            If you access in the region you execute the Lambda in it should have a log group of /aws/lambda/functionname.

            Then a stream of the save revision

            Source https://stackoverflow.com/questions/62121378

            QUESTION

            Lambda: Value of property Layers must be of type List of String
            Asked 2020-May-29 at 23:17

            I'm getting started trying to write a lambda function with node and puppeteer. I'm using the serverless framework

            I've been trying to follow https://codissimo.sinumo.tech/2019/12/27/serverless-puppeteer-with-aws-lambda-layers-and-node-js/ to utilize the provisioned chrome at https://github.com/shelfio/chrome-aws-lambda-layer . My function is working as expected locally.

            My Yaml file contains:

            ...

            ANSWER

            Answered 2020-May-29 at 22:20

            There is a space in your layer ARN.

            Your config in YAML:

            Source https://stackoverflow.com/questions/62093365

            QUESTION

            Chrome Binary Not Found on AWS Lambda Using Serverless and chrome-aws-lambda Node package
            Asked 2020-Feb-09 at 21:28

            I have created a simple application that accepts a URL and converts it to a PDF. It stores the resultant PDF in an S3 bucket and returns the URL of the PDF. It uses Chrome (running headless) to convert the URL to a PDF. I used the serverless framework, AWS Lambda, and the chrome-aws-lambda npm package. When I execute this setup locally using serverless it all works great. I can use postman to make a request with a URL and it returns the URL of the resultant PDF. When I deploy this setup to AWS Lambda, it returns a 502 internal server error response. When I look at the AWS logs for my application I see the following:

            ...

            ANSWER

            Answered 2020-Feb-07 at 01:36

            serverless-bundle only includes the JS code that you use in your handler and strips everything else to minimize your bundle. That means the chrome binaries are excluded.

            To include those binaries, add the following to your serverless.yml:

            Source https://stackoverflow.com/questions/59987104

            QUESTION

            How to read an item from dynamodb in an async function (aws lambda)?
            Asked 2020-Jan-16 at 17:42

            So a little background to the task, I'm trying to run the chrome-aws-lambda on aws lambda.

            As you can see on the GitHub, it follows async/await syntax. My problem is, I want to be able to read a value from dynamodb in the middle of the execution of chrome-AWS-lambda.

            I know how to read the value from dynamodb in normal function, I know how to use chrome-AWS-lambda. I just can't get these 2 to work together.

            Should I be using some special function to read the data from dynamodb? currently, I am using DocumentClient.get()

            Any help would be very appreciated.

            ...

            ANSWER

            Answered 2020-Jan-16 at 17:42

            you can force the return to be a promise, and thus it will satisfy async/await requirements:

            DocumentClient.get().promise()

            Source https://stackoverflow.com/questions/59773217

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install chrome-aws-lambda

            This will ship with appropriate binary for the latest stable release of puppeteer (usually updated within a few days).

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/alixaxel/chrome-aws-lambda.git

          • CLI

            gh repo clone alixaxel/chrome-aws-lambda

          • sshUrl

            git@github.com:alixaxel/chrome-aws-lambda.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cloud Functions Libraries

            Try Top Libraries by alixaxel

            phunction

            by alixaxelPHP

            genex

            by alixaxelGo

            pagerank

            by alixaxelGo

            dump.HN

            by alixaxelJavaScript

            halBox

            by alixaxelShell