AWS extension implementation for Sentry’s AWS Lambda layer.
An AWS extension is a binary that is bundled along with the SDK and its dependencies in an AWS Layer that is added to a user’s Lambda function. The Lambda Runtime will start the extension binary as a concurrent process that runs independently of the actual function invocation and continues running across multiple function invocations.
Sentry’s extension is basically existing Relay running in proxy mode with an additional
AwsExtension service. The service takes care of the extension lifecycle, namely registering
the extension and continuously polling for next events. Note that the interval between two next
event calls adds to the billing time of the lambda invocation.
The main advantage we get currently from the extension is the lambda function not having to wait
for the event being sent to Sentry by the SDK. The actual sending happens in a concurrent Relay
process so the main function can return sooner and reduce response time of the user’s function.
In the future, we might use some of
NextEventResponse’s fields in
the event payload but that requires intercepting the envelope and modifying it before sending to
See the official Lambda Extensions API documentation for further details.
- Service implementing an AWS extension.
- Generic error in an AWS extension context.
- Response received from the next event API on an
- Response received from the register API.
- Response received from the next event API on a
- Tracing headers from an
- All possible next event responses.