RA
raphaelbh/lambda-local
Docker image for invoke lambda locally.
Lambda Local
Docker image for invoke lambda locally.
AWS Lambda is a serverless, event-driven compute service that lets you run code for virtually any type of application or backend service without provisioning or managing servers. You can trigger Lambda from over 200 AWS services and software as a service (SaaS) applications, and only pay for what you use. Documentation
https://hub.docker.com/r/raphaelbh/lambda
Available actions:
- invoke ${event}
- update-code ${lambda-name}
update-code: update lambda code created in the localstack
Requirements
Installation
$ docker build -t raphaelbh/lambda:latest .Usage
A folder with the lambda function must be informed through a volume:
{your_folder}:/lambda
Important:
/var/run/docker.sockshould be shared as volume- Local network should be shared
--net=host
# create alias for container run
alias lambda="docker run -v /var/run/docker.sock:/var/run/docker.sock -v $(pwd)/sample/lambda:/lambda --net=host raphaelbh/lambda"# call invoke action
$ lambda invoke '{"key":"value"}'
or
$ lambda invoke $(cat sample/events/event.json | tr -d " \t\n\r")# call update-code action
$ lambda update-code 'LambdaFunctionName'Tech Stack
Reference
Feedback
If you have any feedback, please contact me at raphaeldias.ti@gmail.com