Skip to content

Commit 986113f

Browse files
authored
fix(examples): move nginx-zip to provided.al2023, drop the PHP examples (#832)
* fix(examples): use provided.al2023 runtime in nginx-zip `provided.al2` was deprecated on 2026-07-31 (creation disabled 2027-02-01, updates 2027-03-03), so `sam validate --lint` flags it as W2531 and the examples workflow fails. Verified the example still works on AL2023 by mounting the Nginx123X86:12 layer contents at /opt in public.ecr.aws/lambda/provided:al2023: nginx 1.23.3 starts, `GET /` returns 200 and `GET /images/space.jpeg` returns the 1.3 MB binary response with no errors logged. The layer's only bundled library is libcrypt.so.1, which resolves from /opt/lib on the default LD_LIBRARY_PATH. * chore(examples): drop the PHP examples Both PHP examples were built on artifacts frozen in March 2023 that are tied to Amazon Linux 2, and neither can move to AL2023 without those artifacts being rebuilt: - `php-zip` used the `Php82FpmNginx{X86,Arm}:13` layers. On `provided.al2023` php-fpm still starts, but the extensions declared in `php/php.d/extensions.ini` fail to load because they link against AL2-only libraries: `openssl`, `curl` and `ftp` need `libssl.so.10`/`libcrypto.so.10` (OpenSSL 1.0.2), `awscrt` needs `libcrypto.so.10`, `gd` needs `libpng15.so.15`, and `imagick` needs `libfontconfig.so.1`. AL2023 ships OpenSSL 3.x, so a user extending the example would silently lose HTTPS/TLS support. - `php` (Docker) is based on `public.ecr.aws/awsguru/php:82.2023.3.11.1`, the same AL2 build of PHP 8.2. Rather than ship examples whose runtime is deprecated (`provided.al2`, creation disabled 2027-02-01) or whose extension set is quietly broken, drop them. Neither example was covered by the `test-image` or `test-zip` CI matrices, so no test coverage is lost. `README.md` still points PHP users at Bref, and the guide still lists Laravel on Lambda as a community example.
1 parent 34d3a29 commit 986113f

28 files changed

Lines changed: 3 additions & 2859 deletions

File tree

.github/workflows/examples.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
# Docker-based examples verified with sam local start-api. Each matrix entry
8080
# asserts an exact status (and optional body substring) via verify-http.sh,
8181
# not just liveness.
82-
# Excluded: nginx, php, flask, aspnet-mvc (web app hardcodes port 8080
82+
# Excluded: nginx, flask, aspnet-mvc (web app hardcodes port 8080
8383
# which conflicts with SAM's Lambda Runtime Interface Emulator).
8484
test-image:
8585
needs: [build-layer]
@@ -175,7 +175,7 @@ jobs:
175175
# `port` is the app's listening port, passed through to the adapter via the
176176
# PORT parameter; it must differ from SAM's RIE port (8080).
177177
# Excluded: aspnet-*-zip (hardcode port 8080),
178-
# bun/nginx/php-zip (need third-party layers), arm64 examples (javalin, rust-*),
178+
# bun/nginx (need third-party layers), arm64 examples (javalin, rust-*),
179179
# nextjs-zip (Makefile produces a zip artifact incompatible with sam local).
180180
test-zip:
181181
needs: [build-layer]

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ The readiness check port/path and traffic port can be configured using environme
9696
- [SpringBoot in Zip](examples/springboot-zip)
9797
- [SpringBoot Response Streaming](examples/springboot-response-streaming-zip)
9898
- [Nginx](examples/nginx)
99-
- [PHP](examples/php)
10099
- [Rust Actix Web in Zip](examples/rust-actix-web-zip)
101100
- [Rust Axum in Zip](examples/rust-axum-zip)
102101
- [Golang Gin](examples/gin)

docs/guide/src/examples/overview.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ The repository includes working examples for many popular web frameworks, packag
7676
|---------|-----------|-----------|
7777
| [Nginx](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/nginx) | Docker | No |
7878
| [Nginx in Zip](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/nginx-zip) | Zip | No |
79-
| [PHP](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/php) | Docker | No |
80-
| [PHP in Zip](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/php-zip) | Zip | No |
8179
| [Deno Oak in Zip](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/deno-zip) | Zip | No |
8280
| [Ruby Sinatra](https://github.com/aws/aws-lambda-web-adapter/tree/main/examples/sinatra) | Docker | No |
8381

examples/nginx-zip/template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Resources:
1818
Architectures:
1919
- x86_64
2020
Handler: bootstrap
21-
Runtime: provided.al2
21+
Runtime: provided.al2023
2222
Environment:
2323
Variables:
2424
RUST_LOG: debug

examples/php-zip/.gitignore

Lines changed: 0 additions & 19 deletions
This file was deleted.

examples/php-zip/Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/php-zip/README.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

examples/php-zip/app/composer.json

Lines changed: 0 additions & 18 deletions
This file was deleted.

examples/php-zip/app/composer.lock

Lines changed: 0 additions & 20 deletions
This file was deleted.

examples/php-zip/app/public/index.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)