https://github.com/syniol/lamda-node-js
Containerised skeleton template project for AWS Lambda using NodeJS runtime and JavaScript
https://github.com/syniol/lamda-node-js
Last synced: 5 months ago
JSON representation
Containerised skeleton template project for AWS Lambda using NodeJS runtime and JavaScript
- Host: GitHub
- URL: https://github.com/syniol/lamda-node-js
- Owner: syniol
- Created: 2021-09-04T19:56:46.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-09-04T21:15:50.000Z (almost 5 years ago)
- Last Synced: 2025-06-04T09:45:31.922Z (about 1 year ago)
- Language: Dockerfile
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AWS Lambda Node with Docker
Basic example template for AWS lambda in Node using JavaScript.
## Development
You could use `docker-compose` for development as it mounts your development
project in Docker container.
In order to initiate lambda container for application please run:
~$: make up
After each change to source code you need to down container and up them again:
~$: make down
## Test Endpoint
Please ensure you have `curl` installed in your host machine; and the run:
curl -XPOST "http://localhost:4000/2015-03-31/functions/function/invocations" -d '{}'
## Deployment
~$: docker build -t syniol.dev/node:14 .
~$: docker run --name syniol-lambda-node --rm -p 80:8080 syniol.dev/node:14
### Docker Image Environment Variables
* LAMBDA_TASK_ROOT: `/var/task`
* LAMBDA_RUNTIME_DIR: `/var/runtime`
#### Credits
2021 © Syniol Limited. All rights reserved.