aws-event-proxy
An AWS Lambda handler that proxies events to a configurable HTTP endpoint.
Forwards events from any AWS source (SQS, SNS, S3, DynamoDB Streams, etc.) to an external HTTP endpoint via POST, including Lambda execution context in the request headers.
Installation
pip install aws-event-proxy
Configuration
Set the PROXY_TARGET_URL environment variable in your Lambda function to the URL you want events forwarded to.
Usage
Set your Lambda handler to:
aws_event_proxy.handler
What it does
- POSTs the raw Lambda event as JSON to
PROXY_TARGET_URL - Attaches Lambda context metadata as the
X-Lambda-Contextrequest header - Returns the parsed JSON response body from the target
- Logs proxy activity and re-raises errors to the Lambda runtime
Packaging for Lambda deployment
import aws_event_proxy
zip_bytes = aws_event_proxy.get_handler_zip()
get_handler_zip() returns the zip file as bytes, ready to upload to Lambda via the AWS SDK or write to disk:
# Write to disk
with open("aws-event-proxy-lambda.zip", "wb") as f:
f.write(aws_event_proxy.get_handler_zip())
# Upload directly with boto3
import boto3
boto3.client("lambda").update_function_code(
FunctionName="my-function",
ZipFile=aws_event_proxy.get_handler_zip(),
)
Set the Lambda handler to aws_event_proxy.handler.
Development
make setup # install dependencies and create .venv
poetry run pytest # run tests
Publishing
poetry publish --build
Metadata
Release files for aws-event-proxy 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aws_event_proxy-0.2.0.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aws_event_proxy-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.7 kB
Release files / aws_event_proxy-0.2.0.tar.gz
| Download URL | aws_event_proxy-0.2.0.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15d989674d07f2388e18d78a85e994265d5f3afdf7070becf277adfeb1e1869e
|
|
BLAKE2b-256 checksum How to use checksums |
c4cd56132b3a084e282a90a8c6b443c4605cc0cf3a0a86baf7d1168bd4348ca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.12.3 Linux/6.6.87.2-microsoft-standard-WSL2
|
Release files / aws_event_proxy-0.2.0-py3-none-any.whl
| Download URL | aws_event_proxy-0.2.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d997f8f65e16bdc48603adb611ebb30e11ef0b4d5a74905b78eeed8b34459a6f
|
|
BLAKE2b-256 checksum How to use checksums |
56494bc0bd8cba8af528d11e3484d068830dbc830ba4c6fe2da723ca4998a1ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.12.3 Linux/6.6.87.2-microsoft-standard-WSL2
|