- Lambda container image based on public.ecr.aws/lambda/nodejs:20
- Amazon Linux 2023
- Xvfb from xorg-x11-server-Xvfb
Issue: Running Xvfb directly in Lambda fails with:
XKB: Failed to compile keymap
Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config.
Fatal server error: Failed to activate virtual core keyboard: 2
Root Cause: Lambda's read-only filesystem prevents xkbcomp from writing compiled keymaps to /var/lib/xkb. Even with xkeyboard-config and xkbcomp installed, Xvfb cannot initialize because XKB compilation fails. Workaround: Using xvfb-run wrapper instead of direct Xvfb invocation works, as it handles XKB setup internally. Request: Please provide either:
- A Lambda layer with pre-configured Xvfb/XKB support
- Documentation for headless GL rendering in Lambda containers
- Allow /var/lib/xkb to be writable or support XKB_OUTPUT_DIR environment variable