An open API service indexing awesome lists of open source software.

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

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.