Local executor for AWS Lambda functions with SQS event source mapping emulation.
WARNING!
This project is under development and intended only for local emulation of AWS services.
Docker Hub page.
version: "3.7"
services:
#
# Local Lambda Executor
#
lle:
image: chimplie/local-lambda-executor:local
command: ["start"]
environment:
- "SQS_ENDPOINT=http://sqs:9324"
# These are the fake credentials to bypass AWS-SDK limitations:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
ports:
- "3000:3000"
volumes:
- .config/local-lambda-executor/config.yml:/opt/lle/config/config.yml
#
# Replace with your lambda function
#
lambda:
image: sample-lambdas/baasic:local
build: sample-lambdas/basic
ports:
- "8080:8080"
#
# This will emulate SQS. See: https://github.com/softwaremill/elasticmq
#
sqs:
image: softwaremill/elasticmq-native:latest
ports:
- "9324:9324"
- "9325:9325"
volumes:
- .config/elasticmq/:/opt/persist
- .config/elasticmq/elasticmq.conf:/opt/elasticmq.conf
Also check project docker-compose.yml
.
queues:
tasks:
name: tasks
producers:
- timeout: 0.25
body: "Hello"
params:
DelaySeconds: 1
results:
name: results
consumers:
- MaxNumberOfMessages: 5
WaitTimeSeconds: 10
dead_letters:
name: dead-letters
consumers:
- MaxNumberOfMessages: 5
WaitTimeSeconds: 10
lambdas:
basic:
params:
endpoint: "http://lambda:8080"
eventSourceMappings:
- queue: tasks
lambda: basic
Also check configs in ./.config/local-lambda-executor/
.
Init repository:
make init
Build project in Docker:
make build
Run project in Docker:
make up
Stop Docker application:
make down
Check other Makefile
commands by:
make help