This release is a pre-release and may not be stable for production use.
benzene-aws
Host Benzene Python handlers on AWS Lambda —
one function, several event sources (API Gateway, SQS, SNS, S3, EventBridge, DynamoDB Streams,
Kinesis Data Streams, Kafka/MSK, direct Lambda invoke) — plus SNS/SQS/EventBridge/Kinesis/Lambda
outbound clients. The same handlers, no rewrite. Depends on benzene-core and benzene-http.
pip install benzene-aws # add [boto3] for the real outbound clients
from benzene.aws import AwsLambdaApp, to_lambda_handler
app = AwsLambdaApp(http_router=router, registry=registry)
handler = to_lambda_handler(app) # your Lambda entry point: handler(event, context)
- API Gateway — HTTP-like; route → topic, Benzene status → HTTP code.
- SQS — one scope per record; failures reported via the SQS partial-batch-response
(
batchItemFailures) so only failed records redeliver. - SNS — one scope per record; a failure raises so Lambda retries.
- S3 (object-created) — one scope per record; bucket/key/
eventNamebecome the body; topic from an injectable convention (defaults3:object-created). No partial-batch channel, so a failure raises. - EventBridge — a single event; topic from
detail-type, body is thedetail. A failure raises. - DynamoDB Streams / Kinesis Data Streams — one scope per record; both support partial batches,
so failures are reported via
batchItemFailureskeyed by the record's sequence number. DynamoDB's topic is derived as{tableName}:{eventName}(e.g.orders:INSERT); Kinesis decodes the base64 payload as the body. - Kafka / MSK — records grouped by topic-partition; one scope per record; topic from the
topicheader (else the Kafka topic), headers decoded UTF-8, base64valueas the body. A failure raises. - Direct invoke — a bare
{"topic", "headers", "body"}Payload, exactly what another Lambda'slambda.invoke(FunctionName=..., Payload=...)sends (seeLambdaMessageSenderbelow). Unlike every trigger-delivered source this is synchronous, like API Gateway: the response envelope is returned verbatim as the invoke's response Payload. AnyAwsLambdaAppanswers it automatically — no extra wiring. - Outbound —
SnsMessageSender/SqsMessageSendercarry the topic + headers as native message attributes;EventBridgeMessageSender/KinesisMessageSenderembed the Benzene envelope in the payload (no attribute channel);LambdaMessageSenderinvokes another Lambda directly (AWS's ownInvokeAPI, no broker) and decodes its response envelope back into aResult(invocation_type="Event"for fire-and-forget). All implementbenzene.core.MessageSenderoverboto3(optional).
Topic for SQS/SNS/Kafka comes from the reserved topic metadata key; the channel-less sources (S3,
EventBridge, DynamoDB, Kinesis) take their topic from a convention configured on the host; a direct
invoke's topic is exactly what the caller sent. Test every event source in memory with
benzene.aws.testing — see the runnable
examples/aws_orders.
Mirrors .NET's Benzene.Aws.Lambda.* / Benzene.Clients.Aws.*, and contributes the benzene.aws
subpackage to the shared benzene namespace.
Metadata
Release files for benzene-aws 0.1.0b2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| benzene_aws-0.1.0b2.tar.gz | 22.6 kB | With provenance | Details for benzene_aws-0.1.0b2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| benzene_aws-0.1.0b2-py3-none-any.whl | Python 3 | none | any | Details for benzene_aws-0.1.0b2-py3-none-any.whl |
Total release size: 50.0 kB
Release files / benzene_aws-0.1.0b2.tar.gz
| Download URL | benzene_aws-0.1.0b2.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce5fb762217916c8e6af0c30bdc4891501fc1a211d55b5f1826b36cee90c1f7d
|
|
BLAKE2b-256 checksum How to use checksums |
e7d107929112dd3ccb49457c852d3686b6b81adaf64e8c23f7e7a6cb2e2f6eb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logRelease files / benzene_aws-0.1.0b2-py3-none-any.whl
| Download URL | benzene_aws-0.1.0b2-py3-none-any.whl |
|---|---|
| Size | 27.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09388a499a632c748c8dd2dc1e811aaf3d757944c811c0ee56231e2c9430282f
|
|
BLAKE2b-256 checksum How to use checksums |
0f285c7045d01a3a753b85cfca7ed5b7af9bfbfd36749b743fb340ce33b2e59b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logSecurity for benzene-aws 0.1.0b2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for benzene_aws-0.1.0b2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.