Layer proxy
Use the layer proxy, Mode A, only when target handler code cannot change. It is experimental, runtime-specific, and more fragile than adapters.
Add the layer
Deploy the bootstrap stack and pass the exported layer ARN into your function:
KhoneLayerArm64Arn="$(aws cloudformation list-exports \
--query 'Exports[?Name==`KhoneLayerArm64Arn`].Value | [0]' \
--output text)"Configure the exec wrapper
Set these variables in the function's Environment.Variables block, not in a shell:
Environment:
Variables:
AWS_LAMBDA_EXEC_WRAPPER: /opt/khone/exec-wrapper.sh
KHONE_MAX_CONCURRENCY: 4Set KHONE_MAX_CONCURRENCY to the route maxBatchSize as a starting point.
Runtime notes
- Node is the most tested layer proxy runtime.
- The exec wrapper sets
AWS_LAMBDA_NODEJS_USE_ALTERNATIVE_CLIENT_1=truewhen multi-concurrency is enabled, unless you override it. - Python 3.14 concurrency remains experimental and uses a telemetry file descriptor workaround.
- User-code streaming is not supported in the layer proxy.
- Duplicate request ids in a batch are rejected.
Prefer Adapters when target code can change.