Skip to content

Commit

Permalink
docs: upd readme
Browse files Browse the repository at this point in the history
  • Loading branch information
vladholubiev committed Sep 14, 2023
1 parent 2a84b09 commit a798d47
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/layers_dispatch.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Deploy Layers

on:
# push:
# branches:
# - master
push:
branches:
- master
schedule:
- cron: '0 0 * * *' # This will run the workflow daily at midnight

Expand Down
1 change: 0 additions & 1 deletion .tag_version

This file was deleted.

23 changes: 22 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,28 @@ When importing the module within lambda, make sure you import `@sparticuz/chromi
const chromium = require('@sparticuz/chromium');
```

**package.json**

- `@sparticuz/chrome-aws-lambda` marked as a dependency

This comment has been minimized.

Copy link
@prabhjot85

prabhjot85 Nov 25, 2023

Should this be not @sparticuz/chromium?

This comment has been minimized.

Copy link
@vladholubiev

vladholubiev Nov 26, 2023

Author Member

right, thx

This comment has been minimized.

Copy link
@vladholubiev

vladholubiev Nov 26, 2023

Author Member

updated readme

- `puppeteer-core` marked as a dependency

**lambda container settings**:

- x86_64 architecture
- > =1024mb 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):

```ts
layers: [LayerVersion.fromLayerVersionArn(this, 'chromium-lambda-layer',
'arn:aws:lambda:us-east-1:764866452798:layer:chrome-aws-lambda:35'
)]
```

**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:35`
Expand All @@ -40,7 +62,6 @@ const chromium = require('@sparticuz/chromium');
* us-west-1: `arn:aws:lambda:us-west-1:764866452798:layer:chrome-aws-lambda:35`
* us-west-2: `arn:aws:lambda:us-west-2:764866452798:layer:chrome-aws-lambda:35`


## License

MIT © [Shelf](https://shelf.io)

0 comments on commit a798d47

Please sign in to comment.