Skip to content

Commit 04eef55

Browse files
committed
fix(aws-lambda): launch Chrome in the image smoke the way Lambda does
@sparticuz/chromium inflates its AL2023 libraries only when AWS_EXECUTION_ENV names a Node runtime; Lambda sets it, a bare docker run does not. The workflow also runs on @sparticuz/chromium bumps and handler ZIP layout changes, which re-stage the image.
1 parent 661c98b commit 04eef55

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/lambda-arm64-image.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
paths:
1111
- "packages/aws-lambda/image/**"
1212
- "packages/aws-lambda/scripts/stage-arm64-image.ts"
13+
# A @sparticuz/chromium bump or a ZIP layout change must re-stage the image.
14+
- "packages/aws-lambda/package.json"
15+
- "packages/aws-lambda/scripts/build-zip.ts"
1316
- ".github/workflows/lambda-arm64-image.yml"
1417
workflow_dispatch:
1518

@@ -85,7 +88,7 @@ jobs:
8588
--build-context task=staged/task --load -t hf-video:ci packages/aws-lambda/image
8689
- name: ffmpeg and Chrome run in the image
8790
run: >-
88-
docker run --rm --entrypoint /var/lang/bin/node
91+
docker run --rm --entrypoint /var/lang/bin/node -e AWS_EXECUTION_ENV=AWS_Lambda_nodejs22.x
8992
-v "$PWD/packages/aws-lambda/image/smoke-video.mjs:/var/task/smoke-video.mjs:ro"
9093
hf-video:ci /var/task/smoke-video.mjs
9194
- name: The Lambda runtime loads the handler

0 commit comments

Comments
 (0)