-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
39 lines (35 loc) · 1.24 KB
/
Copy pathserverless.yml
File metadata and controls
39 lines (35 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
service: php-quickjs-demo
provider:
name: aws
region: eu-west-1
architecture: arm64 # match the .so you ship (arm64 = Graviton, cheaper)
# ── Container-image deployment (this example's Dockerfile) ──────────────
# Bref builds the image from ./Dockerfile and pushes it to ECR.
ecr:
images:
app:
path: ./
file: Dockerfile
platform: linux/arm64
buildArgs:
# BREF_IMAGE defaults to bref/arm-php-84:3 (matches arm64 above).
EXT: php-quickjs-v0.0.2-php8.4-lambda-bref-arm64.so
functions:
demo:
image:
name: app
command: index.php # the handler returned by index.php
# ── Alternative: Lambda layer (the released .zip) instead of Docker ────────
# Publish the layer once:
# aws lambda publish-layer-version \
# --layer-name php-quickjs-php84-arm64 --compatible-architectures arm64 \
# --zip-file fileb://php-quickjs-v0.0.2-php8.4-lambda-bref-arm64.zip
# then drop the `ecr`/`image` blocks above and use the classic runtime + layers:
#
# functions:
# demo:
# handler: index.php
# runtime: php-84
# architecture: arm64
# layers:
# - arn:aws:lambda:<region>:<account>:layer:php-quickjs-php84-arm64:1