Simulate S3 event workflows for AWS Lambda using Minio events locally in dev environments
1.3K
The Minio Lambda Bridge is a Docker image that aims to seamlessly connect Minio, a self-hosted S3-compatible storage system, with local JavaScript-based AWS Lambda functions. This tool provides a local development environment for simulating AWS Lambda triggers using Minio events, enabling you to test and refine your event-driven workflows before deployment.
The Minio Lambda Bridge provides a Docker-based service that listens for Minio events and triggers local JavaScript-based AWS Lambda functions upon event occurrences. This project bridges the gap between Minio's event capabilities and local development environments.
uguraslan/minio-lambda-bridge:latest./usr/src/app in the container.If you are using Docker Compose, you can use the following example as a starting point. This example assumes that you have a local Lambda function located under ./lambda directory. You can change the EVENT_LAMBDA_FUNCTION_PATH environment variable to point to your Lambda function code. But never point your lambda function directly to /usr/src/app directory.
version: "3"
services:
minio-lambda-bridge:
image: uguraslan/minio-lambda-bridge:latest
environment:
MINIO_HOST: http://minio
MINIO_PORT: 9000
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
MINIO_NOTIFICATIONS_BUCKET: my-bucket
MINIO_NOTIFICATIONS_PREFIX: my-prefix
MINIO_NOTIFICATIONS_SUFFIX: my-suffix
MINIO_NOTIFICATIONS_EVENTS: s3:ObjectCreated:*, s3:ObjectRemoved:*
EVENT_LAMBDA_FUNCTION_PATH: lambda/index.js
EVENT_LAMBDA_HANDLER: handler
volumes:
- ./lambda:/usr/src/app/lambda
depends_on:
- minio
minio:
image: minio/minio
restart: always
command: server /data --console-address ":9001"
volumes:
- minio-data:/data
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: myAccessKey
MINIO_ROOT_PASSWORD: mySecretKey
volumes:
minio-data:
| Variable Name | Description | Default Value |
|---|---|---|
MINIO_HOST | Minio server host | http://minio |
MINIO_PORT | Minio server port | 9000 |
MINIO_ACCESS_KEY | Minio server access key | - |
MINIO_SECRET_KEY | Minio server secret key | - |
MINIO_NOTIFICATIONS_BUCKET | Minio bucket name to listen for events | all buckets |
MINIO_NOTIFICATIONS_PREFIX | Minio object prefix to listen for events | all objects |
MINIO_NOTIFICATIONS_SUFFIX | Minio object suffix to listen for events | all objects |
MINIO_NOTIFICATIONS_EVENTS | Minio events to listen for | s3:BucketCreated:*, s3:BucketRemoved:*, s3:ObjectCreated:*, s3:ObjectRemoved:*, s3:ObjectAccessed:* |
EVENT_LAMBDA_FUNCTION_PATH | Relative path (under /usr/src/app) to local Lambda function | - |
EVENT_LAMBDA_HANDLER | Lambda function handler name | - |
Content type
Image
Digest
sha256:dfd0c0bb6…
Size
369.4 MB
Last updated
about 3 years ago
docker pull uguraslan/minio-lambda-bridge