Skip to content

Commit

Permalink
nodeV20 update
Browse files Browse the repository at this point in the history
  • Loading branch information
gauravds committed May 1, 2024
1 parent e48777a commit 07094e5
Show file tree
Hide file tree
Showing 13 changed files with 952 additions and 1,867 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules/
.DS_Store
.cache/
tmp/
tmp/
*.zip
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@ create three layers:

```sh
npm i aws-sdk@2.1520.0
npm i @sparticuz/chromium@119.0.0 #find chromium-v119.0.0-layer.zip and download layer directly from link https://github.com/Sparticuz/chromium/releases/tag/v119.0.0
npm i puppeteer-core@21.5
npm i @sparticuz/chromium@123.0.0 #find chromium-v123.0.0-layer.zip and download layer directly from link https://github.com/Sparticuz/chromium/releases/tag/v123.0.0
npm i puppeteer-core@22.6.4
```

create a folder called `nodejs` and paste `package.json`, `package-lock.json` and `node_modules` inside this folder. archive this as `aws-sdk.zip`/`puppeteer-core-21.5.zip`.
create a folder called `nodejs` and paste `package.json`, `package-lock.json` and `node_modules` inside this folder. archive this as `aws-sdk.zip`/`puppeteer-core-22.6.4.zip`.
upload this archives to `s3` and create layers at lambda.

archive(.zip) the rest of code at `src` folder and upload to lambda function. read the `pdf-to-s3.yaml` for exact lambda config.

```yml
Handler: index.handler
Runtime: nodejs16.x
Runtime: nodejs20.x
MemorySize: 1024
```
<img src="./config.png" width="400" />
I attached lambda to load balancer, you can attach API gateway.
Now ready to do
Expand Down
Binary file added config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
217 changes: 0 additions & 217 deletions package-json/chromium-119.0.0/.package-lock.json

This file was deleted.

122 changes: 0 additions & 122 deletions package-json/chromium-119.0.0/package-lock.json

This file was deleted.

5 changes: 0 additions & 5 deletions package-json/chromium-119.0.0/package.json

This file was deleted.

Loading

0 comments on commit 07094e5

Please sign in to comment.